D14632: keyword rule: Spport for keywords inclusion from another language/file

jonathan poelen noreply at phabricator.kde.org
Thu Aug 15 19:27:31 BST 2019


jpoelen added a comment.


  I don't think using the original word delimiters is a good thing. Let's imagine that c.xml lists the functions of the libc and a language that allows them to be used as `ffi.C.printf` (luajit for the curious). The separators of the 2 languages are not the same and `puts'plop'` works for one, but not for the other. If we rely on the C delimiters, it will not work anymore. I think we can find other examples and perhaps counter-examples.
  
  Currently, if we want to keep the word delimiters, we can always create a context in the referenced file (or another syntax file) and make an `IncludeRule`. It's ugly, the current checker complains if the context is not used, but I don't think that happens in nature. From what I see, the languages that share word lists are either syntactically similar or radically different.

REPOSITORY
  R216 Syntax Highlighting

REVISION DETAIL
  https://phabricator.kde.org/D14632

To: jpoelen, #framework_syntax_highlighting, cullmann, dhaumann, vkrause
Cc: kwrite-devel, vkrause, kde-frameworks-devel, LeGast00n, domson, michaelh, ngraham, bruns, demsking, cullmann, sars, dhaumann
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190815/da36fc52/attachment.html>


More information about the Kde-frameworks-devel mailing list