-
Notifications
You must be signed in to change notification settings - Fork 283
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support multiple lines Expression in LG file (#1921)
* init * add support for multi line expr in LG * fix test case * remove only in test * undo comment
- Loading branch information
1 parent
7a7b458
commit 473d91f
Showing
6 changed files
with
204 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
libraries/botbuilder-lg/tests/testData/examples/MultiLineExpr.lg
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
>Demo How LG can evalute a multiple line defined expression | ||
#definition | ||
- ${count(concat('hello', | ||
'world'))} | ||
|
||
# definition2 | ||
- this is book list: ${join(createArray("Ender's Game", | ||
"Dune") | ||
, ", ")} | ||
|
||
#ExprInCondition | ||
- IF: ${userName.length < 5 || | ||
day == "Monday"} | ||
- Not today | ||
-ELSE: | ||
- Nice Try | ||
|
||
#template | ||
-${sum( | ||
createArray( | ||
1, | ||
2, | ||
3, | ||
4, | ||
5) | ||
)} |
19 changes: 19 additions & 0 deletions
19
libraries/botbuilder-lg/tests/testData/exceptionExamples/MultiLineExprError.lg
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#Demo | ||
- ${createArray(1,2 | ||
2,3) | ||
[import](5.lg) | ||
|
||
#Demo2 | ||
- ${createArray(1, | ||
2,3) | ||
|
||
#Demo3 | ||
- IF ${32.5 > 14.1 || | ||
userName == 'doskey' || | ||
day = 'Monday' | ||
- good day | ||
|
||
#Demo4 | ||
- ${createArray(1, | ||
2,3) | ||
> this is a comment |