Changes between Version 2 and Version 3 of SilverCityAddLanguage
- Timestamp:
- Jul 9, 2004, 2:42:05 PM (20 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
SilverCityAddLanguage
v2 v3 7 7 How to add syntax-highlightning to SilverCity that exists in Scintilla 8 8 ====================================================================== 9 10 First download the !SilverCity package and the latest Scintialla package. 9 11 10 12 root = where you unpacked SilverCity … … 21 23 - cd root/PySilverCity/Src 22 24 23 - python write_scintilla.py ../../scintilla/include tmp.py25 - python write_scintilla.py ../../scintilla/include ../../scintilla/include/Scintilla.iface tmp.py 24 26 25 27 - rm ../SilverCity/ScintillaConstants.py … … 29 31 + Now you change to the root/PySilverCity/SilverCity and have to create a module lang.py 30 32 31 - cp YAML.py lang.py33 - We are using the YAML.py as template so do 'cp YAML.py lang.py' 32 34 33 35 - in lang.py replace every occurance of Yaml with lang 34 36 37 - replace "from ScintillaConstants import SCLEX_YAML" to use your language lexer. 38 39 - replace occurance of SCE_YAML with the equivalant for your language lexer 40 41 - To find the equivalent constant for lang look into ScintillaConstants.py 42 35 43 - change the langue info at the. 36 44 37 + Change suffixes to what the new lang has.45 + Change suffixes to what the new lang has. So that one can deduce from filename what lexer to use. 38 46 39 47 40 - Open root/scintilla/src/Lex'lang' see how many word list arguments are to the function.48 - Open root/scintilla/src/Lex'lang' see how many WordList arguments are to the function. 41 49 42 + In lang.py add so many wordlist in self._keywords in the langLexer.__init__ function50 + In lang.py add so many WordList in self._keywords in the langLexer.__init__ function 43 51 44 -Check the CPP.py as example.52 + Check the CPP.py as example. 45 53 46 54 - Add the keywords for the language in the Keywords module