Skip to content

Commit

Permalink
More operators and docs update
Browse files Browse the repository at this point in the history
Signed-off-by: Heinz N. Gies <[email protected]>
  • Loading branch information
Licenser committed Sep 25, 2023
1 parent 1e4de6a commit a3a6a58
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
7 changes: 2 additions & 5 deletions static/language/epilog/for.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@ For creating the product of numbers in a array we use:
end
```

The current supported operators in `use` are: `+`, `-`, `*` and `/`.



The `ForCaseClause` rule has examples of the two basic forms for record and array comprehensions.
For a overview of supported operators see the [operators](/../../expressions/#operators) section.

The `ForCaseClause` rule has examples of the two basic forms for record and array comprehensions.
8 changes: 4 additions & 4 deletions tremor-script/src/grammar.lalrpop
Original file line number Diff line number Diff line change
Expand Up @@ -1272,10 +1272,10 @@ MaybeFoldOperator: Option<ComprehensionFoldOpRaw> = {
}

FoldOperator: ComprehensionFoldOpRaw = {
"+" => ComprehensionFoldOpRaw(BinOpKind::Add),
"-" => ComprehensionFoldOpRaw(BinOpKind::Sub),
"*" => ComprehensionFoldOpRaw(BinOpKind::Mul),
"/" => ComprehensionFoldOpRaw(BinOpKind::Div),
<BinAdd> => ComprehensionFoldOpRaw(<>),
<BinMul> => ComprehensionFoldOpRaw(<>),
<BinBitAnd> => ComprehensionFoldOpRaw(<>),
<BinBitXor> => ComprehensionFoldOpRaw(<>),
}

ForCaseClauses: ComprehensionCasesRaw<'input, ExprRaw<'input>> = {
Expand Down

0 comments on commit a3a6a58

Please sign in to comment.