Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
14.6. DSL Syntax Examples
Name | Description | Example |
---|---|---|
Quotes | Use quotes for textual data that a rule editor may want to enter. You can also enclose the capture with words to ensure that the text is correctly matched. |
[when]something is "{color}"=Something(color=="{color}") [when]another {state} thing=OtherThing(state=="{state}"
|
Braces | In a DSL mapping, the braces "{" and "}" should only be used to enclose a variable definition or reference, resulting in a capture. If they should occur literally, either in the expression or within the replacement text on the right hand side, they must be escaped with a preceding backslash ("\"). |
[then]do something= if (foo) \{ doSomething(); \}
|
Mapping with correct syntax example | n/a |
|
Expanded DSL example | n/a |
|
Note
If you are capturing plain text from a DSL rule line and want to use it as a string literal in the expansion, you must provide the quotes on the right hand side of the mapping.