Fix number bug, literal nodes WIP

This commit is contained in:
barsdeveloper
2023-05-15 23:37:19 +02:00
parent c4813d8106
commit e5605cfc66
7 changed files with 59 additions and 13 deletions

View File

@@ -67,7 +67,7 @@ export default class Grammar {
static InsideSingleQuotedString = /(?:[^'\\]|\\.)*/
static Integer = /[\-\+]?\d+(?!\d|\.)/
static MultilineWhitespace = /\s*\n\s*/
static Number = /[-\+]?\d+(?:\.\d+)?(?!\d|\.)/
static Number = /[-\+]?(?:\d*\.)?\d+(?!\d|\.)/
static RealUnit = /\+?(?:0(?:\.\d+)?|1(?:\.0+)?)(?![\.\d])/ // A number between 0 and 1 included
static Word = Grammar.separatedBy("[a-zA-Z]", "_")
static Symbol = /[a-zA-Z_]\w*/