Add filenames to FC, relocate errors from other files in playground/vscode

This commit is contained in:
2024-11-27 09:57:22 -08:00
parent a8363c7a45
commit 370fc8e0aa
9 changed files with 86 additions and 57 deletions

View File

@@ -90,8 +90,8 @@ notSpace (MkBounded (Tok Space _) _ _) = False
notSpace _ = True
export
tokenise : String -> Either Error (List BTok)
tokenise s = case lex rawTokens s of
tokenise : String -> String -> Either Error (List BTok)
tokenise fn s = case lex rawTokens s of
(toks, EndInput, l, c, what) => Right (filter notSpace toks)
(toks, reason, l, c, what) => Left (E (l,c) "\{show reason}")
(toks, reason, l, c, what) => Left (E (MkFC fn (l,c)) "\{show reason}")