File tree Expand file tree Collapse file tree 3 files changed +12
-2
lines changed
test/java/com/github/_1c_syntax/bsl/parser Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ plugins {
1515 id(" com.github.ben-manes.versions" ) version " 0.52.0"
1616 id(" ru.vyarus.pom" ) version " 3.0.0"
1717 id(" org.jreleaser" ) version " 1.19.0"
18- id(" org.sonarqube" ) version " 6.2 .0.5505 "
18+ id(" org.sonarqube" ) version " 7.0 .0.6105 "
1919 id(" me.champeau.gradle.jmh" ) version " 0.5.3"
2020}
2121
Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ NULL: 'NULL';
8989DECIMAL : DIGIT +;
9090DATETIME : SQUOTE (~[' \n\r ])*SQUOTE?; // TODO: Честная регулярка
9191
92- FLOAT : DIGIT+ ' .' DIGIT+ ;
92+ FLOAT : DIGIT+ ' .' DIGIT* ;
9393STRING: ' " ' (~[\r\n " ] | ' ""' )* ' "' ;
9494STRINGSTART : ' "' (~[" \n\r ]| '" " ')*;
9595STRINGTAIL: BAR (~[" \n\r] | ' ""' )* ' "' ;
Original file line number Diff line number Diff line change @@ -562,4 +562,14 @@ void testComments() {
562562 testLexer .assertThat ("#Insert // Комментарий" , BSLLexer .HIDDEN )
563563 .containsAll (BSLLexer .PREPROC_INSERT , BSLLexer .WHITE_SPACE , BSLLexer .LINE_COMMENT );
564564 }
565+
566+ @ Test
567+ void testNumber () {
568+ testLexer .assertThat ("0" ).containsAll (BSLLexer .DECIMAL );
569+ testLexer .assertThat ("111" ).containsAll (BSLLexer .DECIMAL );
570+ testLexer .assertThat ("0.1" ).containsAll (BSLLexer .FLOAT );
571+ testLexer .assertThat ("111.111" ).containsAll (BSLLexer .FLOAT );
572+ testLexer .assertThat ("0." ).containsAll (BSLLexer .FLOAT );
573+ testLexer .assertThat ("111." ).containsAll (BSLLexer .FLOAT );
574+ }
565575}
You can’t perform that action at this time.
0 commit comments