livecode / atom-language-livecode

LiveCode Language package for Atom
GNU General Public License v3.0
16 stars 15 forks source link

// Doesn't seem recognized as a comment in LCB scripts by Atom editor #31

Closed dsimpson-dcsi closed 7 years ago

dsimpson-dcsi commented 7 years ago

The BBEdit language files recognize // as an LCB comment, but the Atom lcb.cson file does not. I tried to modify the lcb.cson file to add this feature - hoping to make a useful contribution. But I haven't been successful - maybe I need to add some escaping?

Here is the code I tried: Lines 13-15 { 'include': '#comment.double-slash' }

Lines 101-107: 'comment-double-slash': 'begin': '//' 'beginCaptures': '0': 'name': 'punctuation.definition.comment.double-slash.lcb' 'end': '\n' 'name': 'comment.line.lcb'

peter-b commented 7 years ago

@dsimpson-dcsi I would probably try editing the begin regexp in the comment-line rule in grammars/lcb.cson.

dsimpson-dcsi commented 7 years ago

Excellent idea. I changed line# 91 to: 'begin': '--|//'

and now it works. I will now submit a pull request for this change.