Skip to content

Commit

Permalink
Merge pull request #80 from alexander-zubkov/master
Browse files Browse the repository at this point in the history
A variable can contains digits (#35)
  • Loading branch information
fkleon authored Apr 15, 2024
2 parents a7e99b3 + 3710e58 commit 2c53ec8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/src/parser.dart
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,10 @@ class Lexer {
// Check if the current string is a Number. If it's the case add the string to the intBuffer.
StringBuffer sb = StringBuffer(intBuffer);
try {
// A variable can contains digits
if (varBuffer.isNotEmpty) {
throw FormatException();
}
int.parse(si);
// The current string is a number and it is added to the intBuffer.
sb.write(si);
Expand Down

0 comments on commit 2c53ec8

Please sign in to comment.