-
Notifications
You must be signed in to change notification settings - Fork 789
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clean lexer #1263
Clean lexer #1263
Conversation
forki
commented
Jun 15, 2016
- Removed unused permitFsharpKeywords switch
- cleaned up pattern matching
IdentifierToken args lexbuf s | ||
else v | ||
else | ||
match keywordTable.TryGetValue s with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please double check this return-a-tuple-and-match-on-it formulation produces code at least as good as before. I still tend to write the mutable by hand in performance-critical code but I know there is an optimization that should give us the right code here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
internal static Parser.token KeywordOrIdentifierToken(Lexhelp.lexargs args, LexBuffer<char> lexbuf, string s)
{
Parser.token token1 = (Parser.token) null;
bool flag = Lexhelp.Keywords.keywordTable.TryGetValue(s, out token1);
Parser.token token2 = token1;
if (flag)
{
...
}
}
Somehow the build is broken (unrelated to this)
#sigh |
Thanks for checking the generated code! |
@KevinRansom We can merge this once CI is fixed |
@forki Thank you for taking care of this |