eeeeekkk typo :(
This commit is contained in:
parent
f8697bd662
commit
2af3000c2e
2 changed files with 3 additions and 3 deletions
|
|
@ -42,7 +42,6 @@ proc newBiNode*(nKind: nlNodeKind): nlNode =
|
||||||
|
|
||||||
# Short-hand way of appending a token to a node's token sequence
|
# Short-hand way of appending a token to a node's token sequence
|
||||||
proc addTok*(node: nlNode, tok: nlTok) =
|
proc addTok*(node: nlNode, tok: nlTok) =
|
||||||
echo "AM I HERE?"
|
|
||||||
echo node[]
|
echo node[]
|
||||||
echo node.toks
|
echo node.toks
|
||||||
node.toks.add(tok)
|
node.toks.add(tok)
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,9 @@ proc newParser*(tokStream: var nlTokStream): nlParser =
|
||||||
let rootNode = newNode(nkNone)
|
let rootNode = newNode(nkNone)
|
||||||
result = nlParser(
|
result = nlParser(
|
||||||
stream: tokStream,
|
stream: tokStream,
|
||||||
ast: rootNode,
|
ast: nlAST(
|
||||||
|
root: rootNode
|
||||||
|
),
|
||||||
bnode: rootNode,
|
bnode: rootNode,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -48,7 +50,6 @@ proc newParser*(tokStream: var nlTokStream): nlParser =
|
||||||
proc greed(parser: var nlParser,
|
proc greed(parser: var nlParser,
|
||||||
satisfy: proc(tok: nlTok): bool): nlParseStat =
|
satisfy: proc(tok: nlTok): bool): nlParseStat =
|
||||||
while parser.stream.progress():
|
while parser.stream.progress():
|
||||||
echo "im definitely here!"
|
|
||||||
parser.bnode.addTok(parser.stream.currTok)
|
parser.bnode.addTok(parser.stream.currTok)
|
||||||
if satisfy(parser.stream.currTok):
|
if satisfy(parser.stream.currTok):
|
||||||
return nlParseStat.OK
|
return nlParseStat.OK
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue