[Geany-devel] Patch for JavaScript keywords
Jason Oster
jason.oster at xxxxx
Wed Dec 22 17:37:22 UTC 2010
Geany is missing some of the newer language features available to
JavaScript since about version 1.6. This includes 'get', 'set', and
'yield' [1].
There's also a large gap between the keywords available to JavaScript
embedded in HTML/PHP (filetypes.xml) and JavaScript on its own
(filetypes.javascript); filetypes.xml contains a large number of
keywords, many of which are not just language features, but also
objects, and their properties and methods. This just seems incorrect,
to me. And I'll admit, the separation between embedded and standalone
JavaScript is something of a design flaw in Scintilla. Some might say
it's a "feature".
I'll just attach a patch that contains all of the additions I've
collected over a short (~20 minute) time frame. My primary source is
Mozilla Documentation Network, although the ECMA standards are more
authoritative. (Not that I even want to make an attempt to read it...)
The patch only touches filetypes.javascript, I think filetypes.xml needs
a thorough overlooking to determine what needs to go. I've stuck with
keywords listed in [1] and [2] for what's really necessary to define in
filetypes.javascript.
I tried to keep the separation between primary and secondary keywords
simple: 'primary' keywords are statements, operators, types, values, and
other language constructs. 'secondary' keywords are functions, objects,
properties, methods, etc. Note that I have not included functions like
alert(), confirm(), prompt(), ... in the secondary keywords, because
those are methods of the global window object, and are not a core
function in JavaScript itself.
Finally, the 'secondary' keywords in filetypes.javascript are unused.
This patch fixes it.
[1] https://developer.mozilla.org/en/JavaScript/Reference/Operators
[2] https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects
-------------- next part --------------
A non-text attachment was scrubbed...
Name: geany-javascript.patch
Type: text/x-patch
Size: 1911 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/devel/attachments/20101222/03bee5b4/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jason_oster.vcf
Type: text/x-vcard
Size: 303 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/devel/attachments/20101222/03bee5b4/attachment.vcf>
More information about the Devel
mailing list