D14270: CoffeeScript: fix templates in embedded JavaScript code & add escapes

2018-08-02 Thread Nibaldo González
nibags closed this revision.

REPOSITORY
  R216 Syntax Highlighting

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

To: nibags, dhaumann, cullmann, #framework_syntax_highlighting, #kate
Cc: kwrite-devel, kde-frameworks-devel, michaelh, kevinapavew, ngraham, bruns, 
demsking, cullmann, sars, dhaumann


D14270: CoffeeScript: fix templates in embedded JavaScript code & add escapes

2018-07-31 Thread Nibaldo González
nibags added a comment.


  Now I have access to commits... but apparently, you have to accept the latest 
revision to do so :(

REPOSITORY
  R216 Syntax Highlighting

BRANCH
  jsemb-coffeescript

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

To: nibags, dhaumann, cullmann, #framework_syntax_highlighting, #kate
Cc: kwrite-devel, kde-frameworks-devel, michaelh, kevinapavew, ngraham, bruns, 
demsking, cullmann, sars, dhaumann


D14270: CoffeeScript: fix templates in embedded JavaScript code & add escapes

2018-07-26 Thread Nibaldo González
nibags updated this revision to Diff 38476.
nibags added a comment.


  - Increase file version (to 6).

REPOSITORY
  R216 Syntax Highlighting

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D14270?vs=38194&id=38476

BRANCH
  jsemb-coffeescript

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

AFFECTED FILES
  autotests/folding/test.coffee.fold
  autotests/html/test.coffee.html
  autotests/input/test.coffee
  autotests/reference/test.coffee.ref
  data/syntax/coffee.xml

To: nibags, dhaumann, cullmann, #framework_syntax_highlighting, #kate
Cc: kwrite-devel, kde-frameworks-devel, michaelh, kevinapavew, ngraham, bruns, 
demsking, cullmann, sars, dhaumann


D14270: CoffeeScript: fix templates in embedded JavaScript code & add escapes

2018-07-22 Thread Dominik Haumann
dhaumann accepted this revision.
dhaumann added a comment.
This revision is now accepted and ready to land.


  Besides version number, lgtm.

REPOSITORY
  R216 Syntax Highlighting

BRANCH
  jsemb-coffeescript

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

To: nibags, dhaumann, cullmann, #framework_syntax_highlighting, #kate
Cc: kwrite-devel, kde-frameworks-devel, michaelh, kevinapavew, ngraham, bruns, 
demsking, cullmann, sars, dhaumann


D14270: CoffeeScript: fix templates in embedded JavaScript code & add escapes

2018-07-22 Thread Dominik Haumann
dhaumann added a comment.


  Makes sense. Can you also increase the version number in the language element?
  
  BTW, do you have commit access? Given your frequent updates, it makes sense 
if you can push yourself.

REPOSITORY
  R216 Syntax Highlighting

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

To: nibags, dhaumann, cullmann, #framework_syntax_highlighting, #kate
Cc: kwrite-devel, kde-frameworks-devel, michaelh, kevinapavew, ngraham, bruns, 
demsking, cullmann, sars, dhaumann


D14270: CoffeeScript: fix templates in embedded JavaScript code & add escapes

2018-07-22 Thread Nibaldo González
nibags edited the summary of this revision.

REPOSITORY
  R216 Syntax Highlighting

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

To: nibags, dhaumann, cullmann, #framework_syntax_highlighting, #kate
Cc: kwrite-devel, kde-frameworks-devel, michaelh, kevinapavew, ngraham, bruns, 
demsking, cullmann, sars, dhaumann


D14270: CoffeeScript: fix templates in embedded JavaScript code & add escapes

2018-07-22 Thread Nibaldo González
nibags edited the summary of this revision.
nibags added reviewers: dhaumann, cullmann, Framework: Syntax Highlighting, 
Kate.

REPOSITORY
  R216 Syntax Highlighting

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

To: nibags, dhaumann, cullmann, #framework_syntax_highlighting, #kate
Cc: kwrite-devel, kde-frameworks-devel, michaelh, kevinapavew, ngraham, bruns, 
demsking, cullmann, sars, dhaumann


D14270: CoffeeScript: fix templates in embedded JavaScript code & add escapes

2018-07-22 Thread Nibaldo González
nibags created this revision.
Restricted Application added projects: Kate, Frameworks.
Restricted Application added subscribers: kde-frameworks-devel, kwrite-devel.
nibags requested review of this revision.

REVISION SUMMARY
  In CoffeeScript, the character ` (grave accent) is used to insert JavaScript 
code, but in JavaScript that same character is used for templates. The 
templantes in embedded JavaScript code are done by prefixing backslashes, as 
mentioned in the CoffeeScript documentation [1].
  
  To do this I had to overwrite some JavaScript rules, since some contexts of 
`javascript.xml` contain`  `, where you can 
also insert templates.
  
  I also added the escapes supported by CoffeeScript, which are the same as 
JavaScript [2], with the exception of the octal escapes.
  
  All changes were tested using the CoffeeScript playground [3].
  
  References:
  
  - [1] CoffeeScript. Embedded JavaScript: https://coffeescript.org/#embedded
  - [2] JavaScript escapes: 
https://mathiasbynens.be/notes/javascript-escapes#unicode-code-point
  - [3] Try CoffeeScript: https://coffeescript.org/#try

REPOSITORY
  R216 Syntax Highlighting

BRANCH
  jsemb-coffeescript

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

AFFECTED FILES
  autotests/folding/test.coffee.fold
  autotests/html/test.coffee.html
  autotests/input/test.coffee
  autotests/reference/test.coffee.ref
  data/syntax/coffee.xml

To: nibags
Cc: kwrite-devel, kde-frameworks-devel, michaelh, kevinapavew, ngraham, bruns, 
demsking, cullmann, sars, dhaumann