Implement repeat loops

This commit is contained in:
2021-03-01 20:18:52 -08:00
parent 745920b139
commit 877f85ef78
5 changed files with 53 additions and 15 deletions

View File

@@ -10,8 +10,8 @@ var scptLexer = lexer.Must(stateful.NewSimple([]stateful.Rule{
{"Ident", `[a-zA-Z]\w*`, nil},
{"String", `"[^"]*"`, nil},
{"Number", `(?:\d*\.)?\d+`, nil},
{"Punct", `[-[!@#$&()_{}\|:;"',.?/]|]`, nil},
{"Punct", `[-[!@$&()_{}\|:;"',.?/]|]`, nil},
{"Whitespace", `[ \t\r\n]+`, nil},
{"Comment", `#[^\n]+`, nil},
{"Operator", `(>=|<=|>|<|==|!=)|[-+*/^%]`, nil},
}))
}))