parser: accepts espression forest (multi expressions)

This commit is contained in:
2024-03-31 06:10:27 +02:00
parent 4e361f938e
commit 28e3b2f741
2 changed files with 112 additions and 104 deletions
+5
View File
@@ -81,6 +81,11 @@ func (self *parser) parse(scanner *scanner, termSymbols ...Symbol) (tree *ast, e
continue
}
if tk.Sym == SymSemiColon {
tree.ToForest()
continue
}
//fmt.Println("Token:", tk)
if firstToken && (tk.Sym == SymMinus || tk.Sym == SymPlus) {
if tk.Sym == SymMinus {