add - as an idCont char
This commit is contained in:
parent
f6bc8cad1f
commit
21da2d1d21
2 changed files with 3 additions and 1 deletions
|
@ -129,7 +129,7 @@ isIdStart ch =
|
|||
export
|
||||
isIdCont : Char -> Bool
|
||||
isIdCont ch =
|
||||
isIdStart ch || ch == '\'' || isMark ch || isNumber ch
|
||||
isIdStart ch || ch == '\'' || ch == '-' || isMark ch || isNumber ch
|
||||
|
||||
export
|
||||
isIdConnector : Char -> Bool
|
||||
|
|
|
@ -55,6 +55,8 @@ tests = "lexer" :- [
|
|||
"identifiers & keywords" :- [
|
||||
lexes "abc" [I "abc"],
|
||||
lexes "abc def" [I "abc", I "def"],
|
||||
lexes "abc_def" [I "abc_def"],
|
||||
lexes "abc-def" [I "abc-def"],
|
||||
lexes "abc{-comment-}def" [I "abc", I "def"],
|
||||
lexes "λ" [R "λ"],
|
||||
lexes "fun" [R "λ"],
|
||||
|
|
Loading…
Reference in a new issue