eeeeekkk typo :(

This commit is contained in:
Emile Clark-Boman 2025-06-19 02:11:52 +10:00
parent f8697bd662
commit 2af3000c2e
2 changed files with 3 additions and 3 deletions

View file

@ -42,7 +42,6 @@ proc newBiNode*(nKind: nlNodeKind): nlNode =
# Short-hand way of appending a token to a node's token sequence
proc addTok*(node: nlNode, tok: nlTok) =
echo "AM I HERE?"
echo node[]
echo node.toks
node.toks.add(tok)

View file

@ -32,7 +32,9 @@ proc newParser*(tokStream: var nlTokStream): nlParser =
let rootNode = newNode(nkNone)
result = nlParser(
stream: tokStream,
ast: rootNode,
ast: nlAST(
root: rootNode
),
bnode: rootNode,
)
@ -48,7 +50,6 @@ proc newParser*(tokStream: var nlTokStream): nlParser =
proc greed(parser: var nlParser,
satisfy: proc(tok: nlTok): bool): nlParseStat =
while parser.stream.progress():
echo "im definitely here!"
parser.bnode.addTok(parser.stream.currTok)
if satisfy(parser.stream.currTok):
return nlParseStat.OK