-
Notifications
You must be signed in to change notification settings - Fork 743
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
Add Xojo lexer. #1131
Add Xojo lexer. #1131
Conversation
Started with a fresh branch. Simplified the lexer and removed unneeded parsing.
Thanks for responding so quickly, @jimmckay. I'm looking through the lexer but have an additional request in the meantime. Could you add a spec? A simple one like the one for Rust would be fine: rouge/spec/lexers/rust_spec.rb Lines 1 to 22 in e5ec8df
You can skip the guessing by source test as it's not relevant here. |
Sure. I'll take a look. |
Cheers :) Might not be able to get through a review tonight but will try to have it done by tomorrow! |
Sounds great! Let me know about anything that could be improved. I'm very new to Ruby. |
Added an intentional error to test for 1..0 being read as a valid float
Removed state sections. This lexer is simple enough that states are really not needed at this point. Added word boundary to the Float regex to avoid 1..0 being read as a valid float. Adjusted double-quote regex to allow for (and enforce) escaped quotes (two double quotes with no space between) I may revisit this in the future. &HFFEEDD style literals now marked as Literal.Number.Hex rather than Integer
Added example to sample
Thanks for putting this together, @jimmckay! Much appreciated :) |
Started with a fresh branch.
Simplified the lexer and removed unneeded parsing.