Lua: updated for Lua5.3

Authored by jpoelen on May 4 2018, 12:06 AM.



Add of:

  • shebang
  • hexadecimal float
  • special char: \u{xxx}, \xXX, \ddd and \z
  • bitwise operator
  • metamethod
  • some other improvements

Diff Detail

No Linters Available
No Unit Test Coverage
jpoelen created this revision.May 4 2018, 12:06 AM
Restricted Application added a subscriber: Frameworks. · View Herald TranscriptMay 4 2018, 12:06 AM
jpoelen requested review of this revision.May 4 2018, 12:06 AM
dhaumann accepted this revision.May 6 2018, 6:58 PM

Looks good to me. Please push.

This revision is now accepted and ready to land.May 6 2018, 6:58 PM

@jpoelen Could you have a look at ? It seems we have a regression?

Restricted Application edited subscribers, added: kde-frameworks-devel; removed: Frameworks. · View Herald TranscriptMay 13 2018, 3:06 AM

There is indeed a problem with Kate, but it works with KSyntaxHighlighting. I will look in what part of doxygenlua.xml the problem is.

@jpoelen And why is it a problem with Kate? This means the C++ implementation of the highlighting rules is different in KSyntaxHighlighting and KTextEditor? If so, this would be an important catch. Can you elaborate why this is going wrong?

@vkrause see above.

@dhaumann The difference is in the dynamic attribute of a context. Kate propagates the captures only if the value is true whereas SyntaxHighlighting never looks at that value and only uses the dynamic attribute of the rules.

Personally, I find that having this attribute in contexts unnecessarily complicates the writing of rules. Same for fallthrough which is redundant to fallthroughContext.

Doxygenlua.xml fixed in D12860

@vkrause @cullmann Could you please comment on the above? Should we change KTextEditor such that dynamic is automatically derived based on whether there is a dynamic rule? Indeed, I agree with @jpoelen that this is redundant.

That's probably due to me misunderstanding the intended/existing behavior when implementing this, not an intentional decision in KSyntaxHighlighting. Removing redundancy sounds like a good idea though.