Skip to content

Commit

Permalink
Merge pull request #2385 from lf-lang/cpp-raw-str
Browse files Browse the repository at this point in the history
C++ raw strings allowed in target code blocks
lhstrh authored Aug 2, 2024
2 parents 2e69da9 + 50b84bc commit 80b0e1c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/src/main/java/org/lflang/LinguaFranca.xtext
Original file line number Diff line number Diff line change
@@ -425,6 +425,8 @@ terminal ML_COMMENT: ('/*' -> '*/') | ("'''" -> "'''");

terminal LT_ANNOT: "'" ID?;

terminal CPP_RAW_STR: 'R"' -> '"';

terminal STRING: '"' ( '\\' . | !('\\' | '"' | '\t' | '\r' | '\n') )* '"'
| '"""' -> '"""'
;
@@ -512,7 +514,7 @@ Body:
// the end of a target-code segment.
Token:
// Non-constant terminals
ID | INT | FLOAT_EXP_SUFFIX | LT_ANNOT | STRING | CHAR_LIT | ML_COMMENT | SL_COMMENT | WS | ANY_OTHER |
ID | INT | FLOAT_EXP_SUFFIX | LT_ANNOT | CPP_RAW_STR | STRING | CHAR_LIT | ML_COMMENT | SL_COMMENT | WS | ANY_OTHER |
// Keywords
'target' | 'import' | 'main' | 'realtime' | 'reactor' | 'state' | 'time' |
'mutable' | 'input' | 'output' | 'timer' | 'action' | 'reaction' |

0 comments on commit 80b0e1c

Please sign in to comment.