Skip to content

Commit 8512903

Browse files
committed
Merge branch 'develop'
2 parents 1694979 + 1a7318d commit 8512903

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

src/main/antlr/BSLLexer.g4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ NULL: 'NULL';
8989
DECIMAL: DIGIT+;
9090
DATETIME: SQUOTE(~['\n\r])*SQUOTE?; // TODO: Честная регулярка
9191
92-
FLOAT : DIGIT+ '.' DIGIT+;
92+
FLOAT : DIGIT+ '.' DIGIT*;
9393
STRING: '"' (~[\r\n"] | '""')* '"';
9494
STRINGSTART: '"' (~["\n\r]| '""')*;
9595
STRINGTAIL: BAR (~["\n\r] | '""')* '"';

src/test/java/com/github/_1c_syntax/bsl/parser/BSLLexerTest.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)