add pipe operator to tokeniser and ast

Executor and recast TODO
This commit is contained in:
Kurt Hutten IrevDev
2022-12-02 21:00:57 +11:00
parent faf37d1b03
commit 15bddcc842
4 changed files with 395 additions and 8 deletions

View File

@ -6,7 +6,7 @@ const WORD = /^[a-zA-Z_][a-zA-Z0-9_]*/
// regex that captures everything between two non escaped quotes and the quotes aren't captured in the match
const STRING = /^(["'])(?:(?=(\\?))\2.)*?\1/
// verbose regex for finding operators, multiple character operators need to be first
const OPERATOR = /^(>=|<=|==|=>|!=|\*|\+|-|\/|%|=|<|>|\||\^)/
const OPERATOR = /^(>=|<=|==|=>|!= |\|>|\*|\+|-|\/|%|=|<|>|\||\^)/
const BLOCK_START = /^\{/
const BLOCK_END = /^\}/