On Tuesday, December 5, 2017 at 12:09:15 PM UTC-6, Edward K. Ream wrote: The keys in the python_main_keywords_dict must be strings, not regular > expressions. However, it definitely would be possible to add entries to > the rules dict: >
Several additional comments: 1. Everything should "just work" if you are prepared to change modes/python.py itself. That is, caching in the colorizer will not be an issue. 2. All colorizer rules, including your new rules, will call colorizer.match_* to do the actual matching. The present python rules call none of the regex-matching rules, but they certainly are free to do so. The regex rules are: match_compiled_regexp, match_eol_span_regexp, match_seq_regexp and match_word_and_regexp. See their docstrings for details. 3. The colorizer calls *only* those rules in the list rulesDict1.get(ch), where ch is the present character being matched. Thus, each rule must know its lead-in characters, and that rule must be present in the appropriate lists in the rulesDict1. HTH. Edward -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/d/optout.
