Skip to content

Commit d9790cd

Browse files
author
Bob Garner
committed
Minor fix to documentation for let instruction.
1 parent 38bb13c commit d9790cd

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

docs/etl/ETL_Instructions.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,14 @@ Assigns the resulting value after evaluating the provided *expression* to the pr
6464

6565
#### Usage
6666

67-
> `$[let `*variable*` = `*expression*`]`
67+
> `$[let `*variable*` `*assignmentOperator*` `*expression*`]`
6868
6969
#### Arguments
7070

7171
| Argument | Type | Description |
7272
|----------|------|-------------|
7373
| *variable* | `String` | The variable to receive the assigned value. |
74-
| *assignmentOperator* | `Operator` | The operator (if any) used with the = sign (e.g. += would supply the + operator here). |
75-
| *assignmentOperatorSymbolType* | `int` | This is the template parser's grammar ID essentially of the +=, -=, etc. operator. |
74+
| *assignmentOperator* | `Operator` | Typically this is just `=` but also supported are `+=`, `-=`, `*=` and `/=`. The `+=` can be used with string variables to concatenate string values. |
7675
| *expression* | `FTExpression` | The expression that will be evaluated. |
7776

7877
<a name="category_context"></a>

src/main/java/org/entityc/compiler/transform/template/tree/FTLet.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
@TemplateInstruction(category = TemplateInstructionCategory.ASSIGNMENT,
2424
name = "let",
25-
usage = "`let `*variable*` = `*expression*",
25+
usage = "`let `*variable*` `*assignmentOperator*` `*expression*",
2626
summary = "This is a straight forward way to assign values to a variable.",
2727
description = "Assigns the resulting value after evaluating the provided *expression* to the provided *variable*.")
2828
public class FTLet extends FTNode {
@@ -38,13 +38,10 @@ public FTLet(ParserRuleContext ctx,
3838
)
3939
String variable,
4040
@TemplateInstructionArgument(
41-
description = "The operator (if any) used with the = sign (e.g. += would supply "
42-
+ "the + operator here)."
41+
description = "Typically this is just `=` but also supported are `+=`, `-=`, `*=` and `/=`. "
42+
+ "The `+=` can be used with string variables to concatenate string values."
4343
)
4444
FTOperation.Operator assignmentOperator,
45-
@TemplateInstructionArgument(
46-
description = "This is the template parser's grammar ID essentially of the +=, -=, etc. operator."
47-
)
4845
int assignmentOperatorSymbolType,
4946
@TemplateInstructionArgument(
5047
description = "The expression that will be evaluated."

0 commit comments

Comments
 (0)