#1027 KeywordListSeparator

Completed
closed
Neil Hodgson
scintilla (33)
5
2014-01-27
2013-10-14
No

Currently keyWordList is a list of keywords separated by spaces, tabs, "\n" or "\r" or any combination of these, but if keywords have spaces as part of the keyword, they will split up the keywords.
In ZXBC we have e.g.:
SUB name()
END SUB
My proposal is to create a exclusive separator char using UseKeywordListSeparator(, const char *name). For use in Lexer, Autocomplete and Folding command lists. The only problem I maybe can see, is the use of GetWordChar.

Discussion

  • Neil Hodgson
    Neil Hodgson
    2013-10-15

    Multi-word keywords are more complex then simply allowing spaces in the elements of keyword lists. Often the language allows there to be more than one space between the words and one or the other of the words may also be valid as a stand-alone keyword.

    It is probably best to special-case the first word in compound keywords.

     
    • The multiple spaces can be removed in preprocessing.
      The stand-alone keywords are the reason why this would be great:
      END SUB
      END FUNCTION
      as fold close keywords and for autocomplete list
      END
      closes programm, bun not closes fold

      Only optional (If it does not make Scintilla too slow).

       
      • Neil Hodgson
        Neil Hodgson
        2013-10-15

        Then preprocess them to '+' and put that in the list.

         
  • Neil Hodgson
    Neil Hodgson
    2014-01-27

    • labels: --> scintilla
    • status: open --> closed
    • assigned_to: Neil Hodgson