Skip to content

Commit

Permalink
A variable can contains digits (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-zubkov authored Jul 14, 2023
1 parent 7c9e52e commit 3710e58
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 3710e58

Please sign in to comment.