-
Notifications
You must be signed in to change notification settings - Fork 2
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
Implementation of syntax highlighting #13
Conversation
## Rules | ||
|
||
Rules are provided by the singleton [`POCRulesStore.java`](./POCRulesStore.java). There are a set of rules that can be retrieved. In particular, two predefined sets of rules is available: | ||
* the default rules to parse the whole document, |
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 insert a blank line before, because it seems that only GitHub's Markdown parser treats it as a list. You need to write something like this:
List:
* item 1
* item 2
Also, please remove the trailing comma and period at the end of each item, this is the role of a list to separate items, not the punctuation.
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.
I can do that. Bulleted lists and punctuation are quite controversial, but I'll follow your suggestion
Don't prefix file names with |
public IToken evaluate(ICharacterScanner initialScanner) { | ||
super.evaluate(initialScanner); | ||
|
||
this.read(8); |
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.
Maybe put the string "function"
in a static String
constant, and read its length here (and use it for the comparison below).
(In general it's good to reduce constants dependencies, if it doesn't cost for performances here...)
This commit introduces a new package (poc.highlight) that handles syntax highlighting for templates. * Document partitioner A change was necessary in order to have all the document parsed again on source update. * Source viewer configuration The new scanner had to be provided to the DefaultDamagerRepairer * Highlight Scanners, rules and tokens have been added
The region property was not correctly initialized in the constructor of the document partitioner.
The first commit introduces a new package (poc.highlight) that handles syntax highlighting for templates.
A change was necessary in order to have all the document parsed again on source update.
The new scanner had to be provided to the DefaultDamagerRepairer
canners, rules and tokens have been added
The second commit introduces a fix to the error that was raised as soon as a newly created file was edited.
The typed region was not correctly initialized