Use [^] for the lexer's catch-all rule

[^] matches the entire character set, while . doesn't match new lines, etc.
This commit is contained in:
Ben Gruver 2015-03-04 00:16:46 -08:00 committed by Connor Tumbleson
parent 8284715f4d
commit d54c78d966

View File

@ -640,5 +640,5 @@ Type = {PrimitiveType} | {ClassDescriptor} | {ArrayDescriptor}
"." { return invalidToken("Invalid directive"); } "." { return invalidToken("Invalid directive"); }
"." [a-zA-z\-_] { return invalidToken("Invalid directive"); } "." [a-zA-z\-_] { return invalidToken("Invalid directive"); }
"." [a-zA-z\-_] [a-zA-z0-9\-_]* { return invalidToken("Invalid directive"); } "." [a-zA-z\-_] [a-zA-z0-9\-_]* { return invalidToken("Invalid directive"); }
. { return invalidToken("Invalid text"); } [^] { return invalidToken("Invalid text"); }
} }