Skip to content

Commit

Permalink
Merge pull request #42 from 1c-syntax/fix/stringTailquote
Browse files Browse the repository at this point in the history
#41 STRINGPART double quote
  • Loading branch information
nixel2007 authored Aug 21, 2019
2 parents 8b04d29 + 9dbbac2 commit 70d8448
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/antlr/BSLLexer.g4
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ FLOAT : DIGIT+ '.' DIGIT*;
STRING: '"' (~[\r\n"] | '""')* '"';
STRINGSTART: '"' (~["\n\r]| '""')*;
STRINGTAIL: BAR (~["\n\r] | '""')* '"';
STRINGPART: BAR ~["\n\r]*;
STRINGPART: BAR (~[\r\n"] | '""')*;
// keywords
PROCEDURE_KEYWORD
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,13 @@ void testString() {
assertMatch("\"\"\"\"", BSLLexer.STRING);
assertMatch("|СПЕЦСИМВОЛ \"\"~\"\"\"", BSLLexer.STRINGTAIL);
assertMatch("\"Минимальная версия платформы \"\"1С:Предприятие 8\"\" указана выше рекомендуемой.", BSLLexer.STRINGSTART);

assertMatch("А = \" \n | А \"\"\"\" + А \n |\";",
BSLLexer.IDENTIFIER,
BSLLexer.ASSIGN,
BSLLexer.STRINGSTART,
BSLLexer.STRINGPART,
BSLLexer.STRINGTAIL,
BSLLexer.SEMICOLON);
}

@Test
Expand Down

0 comments on commit 70d8448

Please sign in to comment.