summaryrefslogtreecommitdiff
path: root/cpp.sml
diff options
context:
space:
mode:
authorVladimir Azarov <avm@intermediate-node.net>2025-03-25 00:24:52 +0100
committerVladimir Azarov <avm@intermediate-node.net>2025-03-25 00:24:52 +0100
commita0be166ef23e1b34b09060b99c03cdadb6ac2132 (patch)
tree3a54e586b504c6ad4fcb5b620c0ddcead5219ae6 /cpp.sml
parent226f58656b4b7f92f6de9a817ab9106937e061e9 (diff)
Escape sequences
Diffstat (limited to 'cpp.sml')
-rw-r--r--cpp.sml5
1 files changed, 3 insertions, 2 deletions
diff --git a/cpp.sml b/cpp.sml
index 32fcd3c..b2762b5 100644
--- a/cpp.sml
+++ b/cpp.sml
@@ -1,10 +1,11 @@
fun main [fname] =
let
val stream = Stream.streamInit fname
- val (tkl, fileList) = Tokenizer.tokenize stream []
+ val tkl = Tokenizer.tokenize stream
+ val fileInfo = Stream.convert stream
in
List.app
- (fn (p, x) => (Stream.printPos fileList p; Tokenizer.printToken x)) tkl
+ (fn (p, x) => (Stream.printPos fileInfo p; Tokenizer.printToken x)) tkl
end
| main _ = printLn "Expected a signle argument: file name"