Parser 2.0 (Major Delezer) #52

Merged
defunkt merged 35 commits from parser2 into main 2025-12-08 16:35:34 +00:00
Showing only changes of commit e38e8d4f1e - Show all commits

View File

@ -65,7 +65,7 @@ export class Parser {
return node
}
//
//
// parse foundation nodes - statements, expressions
//
@ -321,7 +321,7 @@ export class Parser {
}
// atoms are the basic building blocks: literals, identifiers, words
atom() {
atom(): SyntaxNode {
if (this.is($T.String))
return this.string()
@ -333,7 +333,7 @@ export class Parser {
}
// blocks in if, do, special calls, etc
// `: something end`
// `: something end`
//
// `blockNode` determines whether we return [colon, BlockNode, end] or
// just a list of statements like [colon, stmt1, stmt2, end]
@ -784,7 +784,7 @@ export class Parser {
return new SyntaxNode('Word', parts[0]!.from, parts.at(-1)!.to)
}
//
//
// helpers
//