Tokenisation now accessible via the nlTokStream interface

nlTokStream relies on the functionality of nlLStream
This commit is contained in:
Emile Clark-Boman 2025-06-17 11:29:31 +10:00
parent 4b20f9961b
commit 9109c4d680
9 changed files with 248 additions and 40 deletions

13
src/nlx.nim Normal file
View file

@ -0,0 +1,13 @@
import os
import noether/lex
when isMainModule:
echo "Noether Lang - Extras"
if paramCount() > 0:
let filename = paramStr(1)
var tokStream = newTokStream(filename, isFile=true)
for tok in toks(tokStream):
echo tok
else:
echo "usage: nlx filename"