Tokenisation now accessible via the nlTokStream interface
nlTokStream relies on the functionality of nlLStream
This commit is contained in:
parent
4b20f9961b
commit
9109c4d680
9 changed files with 248 additions and 40 deletions
13
src/nlx.nim
Normal file
13
src/nlx.nim
Normal 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"
|
||||
Loading…
Add table
Add a link
Reference in a new issue