diff options
-rw-r--r-- | src/urweb.lex | 2 | ||||
-rw-r--r-- | tests/sigbug.ur | 3 | ||||
-rw-r--r-- | tests/sigbug.urs | 3 |
3 files changed, 7 insertions, 1 deletions
diff --git a/src/urweb.lex b/src/urweb.lex index 21e3d603..19f28738 100644 --- a/src/urweb.lex +++ b/src/urweb.lex @@ -416,7 +416,7 @@ xint = x[0-9a-fA-F][0-9a-fA-F]; <INITIAL> "structure" => (Tokens.STRUCTURE (pos yypos, pos yypos + size yytext)); <INITIAL> "signature" => (Tokens.SIGNATURE (pos yypos, pos yypos + size yytext)); <INITIAL> "struct" => (Tokens.STRUCT (pos yypos, pos yypos + size yytext)); -<INITIAL> "sig" => (if yypos = 2 then initialSig () else (); Tokens.SIG (pos yypos, pos yypos + size yytext)); +<INITIAL> "sig" => (if yypos <= 2 then initialSig () else (); Tokens.SIG (pos yypos, pos yypos + size yytext)); <INITIAL> "let" => (Tokens.LET (pos yypos, pos yypos + size yytext)); <INITIAL> "in" => (Tokens.IN (pos yypos, pos yypos + size yytext)); <INITIAL> "end" => (Tokens.END (pos yypos, pos yypos + size yytext)); diff --git a/tests/sigbug.ur b/tests/sigbug.ur new file mode 100644 index 00000000..ec00343c --- /dev/null +++ b/tests/sigbug.ur @@ -0,0 +1,3 @@ +val z = 3 +val x = 1 +val y = 2 diff --git a/tests/sigbug.urs b/tests/sigbug.urs new file mode 100644 index 00000000..81693932 --- /dev/null +++ b/tests/sigbug.urs @@ -0,0 +1,3 @@ +val x : inta +val y : into +val z : introx |