Add the ability to lex primitives and lambdas.

This commit is contained in:
2011-02-03 21:31:14 -05:00
parent fafc51da1c
commit 566560edb4
3 changed files with 7 additions and 3 deletions

View File

@@ -40,7 +40,9 @@ $escape_char = [abfnrtv'\"\\]
-- Identifier
$typestart $identrest* { emitS TokTypeIdent }
"prim%" $typestart $identrest* { emitS TokTypeIdent }
$valstart $identrest* { emitS TokValIdent }
"prim%" $valstart $identrest* { emitS TokValIdent }
$opident+ { emitS TokOpIdent }
":"+ { emitS TokOpIdent }
@@ -60,6 +62,7 @@ $escape_char = [abfnrtv'\"\\]
";" { emitT Semi }
"," { emitT Comma }
"`" { emitT BTick }
[\\] { emitT LLambda }
{