88 Commits

Author SHA1 Message Date
Thomas Aylott 935f60436d fixed syntax coloring for operators 2009-10-05 12:35:04 -04:00
Thomas Aylott 24df8f3728 added mutator scope for special styling mutating method names 2009-04-22 00:00:07 -04:00
Thomas Aylott 81830b803b rearrange includes to make keywords have a higher priority 2009-02-16 23:35:11 -05:00
Thomas Aylott 590fd26aae Updated Javascript Basic syntax.
literal-function-call
    literal-variable
    keyword.operators
    literal-regex
2009-02-15 08:14:36 +00:00
Thomas Aylott ba5fa1d4d8 Updated folding to that of Embedded 2009-02-15 08:14:36 +00:00
Thomas Aylott a8b1d18261 MUCH simpler and more bulletproof regex for indent and folding with tests 2009-02-15 08:14:35 +00:00
Thomas Aylott 4d6df87768 Fixed a strange issue with the folding & indent. It wasn't properly matching escaped strings inside strings 2009-02-15 08:14:35 +00:00
Thomas Aylott 3dd8342167 Fix an issue where a @ in a block comment would cause IE conditional comment matching for the rest of the document 2009-02-15 08:14:34 +00:00
Thomas Aylott 148d7ee9f3 NEW Advanced Folding and Indent patterns!
Added switch…case tests
2009-02-15 08:14:34 +00:00
Thomas Aylott 5c0aa849b3 NEW: Advanced folding rules
Added more Tests for folding and indent
2009-02-15 08:14:33 +00:00
Thomas Aylott b239febbfd Removed the conditional-compilation since I moved it into the other syntax 2009-02-15 08:14:32 +00:00
Thomas Aylott a2937c6427 Added special-comments-conditional-compilation for IE; Added leading-space scopes 2009-02-15 08:14:32 +00:00
subtlegradient 8b7b886f82 Fixed the illegal number scopes
git-svn-id: http://macromates.com/svn/Bundles/trunk/Review/Bundles/JavaScript.tmbundle@10185 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2008-07-07 17:17:39 +00:00
subtlegradient d99f721b82 .999 numbers.invalid scopes for octal and hex. -999 and +999 numbers
git-svn-id: http://macromates.com/svn/Bundles/trunk/Review/Bundles/JavaScript.tmbundle@10184 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2008-07-07 17:17:32 +00:00
subtlegradient 1a60d48c2a Reorganize the JavaScript Basic syntax. Moved everything into the repository.
git-svn-id: http://macromates.com/svn/Bundles/trunk/Review/Bundles/JavaScript.tmbundle@10183 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2008-07-07 17:17:26 +00:00
subtlegradient ac0c3b2f56 Improved String Literal syntax. Fixed the "bug" where an unclosed string extends past the closign script tag in html.
String should end on \n with a syntax error
String should end on </script>\n with a syntax error
String should mark </script> as invalid

git-svn-id: http://macromates.com/svn/Bundles/trunk/Review/Bundles/JavaScript.tmbundle@10170 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2008-07-05 23:42:19 +00:00
subtlegradient 5692efe8c1 Removed redundant group scope
git-svn-id: http://macromates.com/svn/Bundles/trunk/Review/Bundles/JavaScript.tmbundle@10113 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2008-07-02 17:01:52 +00:00
subtlegradient 743c785083 Scientific notation => Ex, 1e5 and 2.5E5
from Joseph Pecoraro

git-svn-id: http://macromates.com/svn/Bundles/trunk/Review/Bundles/JavaScript.tmbundle@10111 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2008-07-02 17:01:42 +00:00
subtlegradient 87f90e9d19 Don't require a space after the function keyword
Merging in a modified version of Joseph Pecoraro's fix here: http://pastie.textmate.org/private/hxkpy8qkahofrxwyvp4coq

git-svn-id: http://macromates.com/svn/Bundles/trunk/Review/Bundles/JavaScript.tmbundle@10110 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2008-07-02 17:01:36 +00:00
subtlegradient 60c8151e9b Merging in the regex fixes from Joseph Pecoraro as seen here: http://lists.macromates.com/textmate/2008-June/025973.html
git-svn-id: http://macromates.com/svn/Bundles/trunk/Review/Bundles/JavaScript.tmbundle@10109 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2008-07-02 17:01:31 +00:00
subtlegradient a09b74f571 Impriving regexp literals
git-svn-id: http://macromates.com/svn/Bundles/trunk/Review/Bundles/JavaScript.tmbundle@10107 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2008-07-02 17:01:20 +00:00
subtlegradient b5363c34e5 Undefined -> undefined
git-svn-id: http://macromates.com/svn/Bundles/trunk/Review/Bundles/JavaScript.tmbundle@10106 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2008-07-02 17:01:15 +00:00
subtlegradient efa328fc93 Improved meta.function.json.js with punctuation and proper storage.type
git-svn-id: http://macromates.com/svn/Bundles/trunk/Review/Bundles/JavaScript.tmbundle@10105 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2008-07-02 17:01:10 +00:00
subtlegradient b84367b126 Fixed regression with nested groups and functions
git-svn-id: http://macromates.com/svn/Bundles/trunk/Review/Bundles/JavaScript.tmbundle@9131 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2008-03-16 06:35:43 +00:00
subtlegradient bb8deef61d Tweaking regex for optimization and performance. disabling "punctuation.section.scope.round" seems to have helped.
git-svn-id: http://macromates.com/svn/Bundles/trunk/Review/Bundles/JavaScript.tmbundle@9130 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2008-03-16 06:16:45 +00:00
subtlegradient 151f7a83eb Don't match a single slash (/) as a regex literal unless there's another one on the same line. Force Regex literals to end at the end of the line. This helps solve some performance issues while coding. Thanks Daniel Stockman
git-svn-id: http://macromates.com/svn/Bundles/trunk/Review/Bundles/JavaScript.tmbundle@9128 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2008-03-16 03:24:13 +00:00
subtlegradient d72e54c64d Fixed the parsing of object values that are regular expression literal. Thanks Daniel Stockman
git-svn-id: http://macromates.com/svn/Bundles/trunk/Review/Bundles/JavaScript.tmbundle@9126 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2008-03-16 02:38:15 +00:00
subtlegradient f6ff90bedc Split out object-properties into the repository to keep things clean
git-svn-id: http://macromates.com/svn/Bundles/trunk/Review/Bundles/JavaScript.tmbundle@8632 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2007-12-09 08:19:12 +00:00
subtlegradient f577ae87e4 Renamed "Javascript Basic" to "Javascript Embedded" Thanks Infin.
New scope: meta.complete.method for the first character of white space after a dot.

git-svn-id: http://macromates.com/svn/Bundles/trunk/Review/Bundles/JavaScript.tmbundle@8631 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2007-12-09 08:18:54 +00:00
subtlegradient 581d5ad997 Changes scopes. source.js => source.js.base, source.js.basic => source.js
Include source.js.basic if you want embedded javascript in your language.
Include source.js.base if you want to extend javascript, EG: MooTools

git-svn-id: http://macromates.com/svn/Bundles/trunk/Review/Bundles/JavaScript.tmbundle@8614 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2007-12-05 21:22:56 +00:00
subtlegradient 97c40c67f1 Merged changes from stable
git-svn-id: http://macromates.com/svn/Bundles/trunk/Review/Bundles/JavaScript.tmbundle@8601 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2007-12-05 19:41:09 +00:00
subtlegradient 5335a0d676 Copying JavaScript to review
git-svn-id: http://macromates.com/svn/Bundles/trunk/Review/Bundles/JavaScript.tmbundle@8600 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2007-12-05 18:44:38 +00:00
duff 093215cd0b • match regexps that follow a ‘return’ keyword, example:
return /^[a-zA-Z]([a-zA-Z0-9+-.])*:/.test(s);



git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@7067 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2007-04-26 23:15:46 +00:00
duff c9ca65bb80 • add jsx as a recognized file type, apparently what Photoshop CS2 and CS3 uses for JavaScript
git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@7017 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2007-04-19 22:02:41 +00:00
duff 29989a44d7 • change several patterns of the form: [A-Za-z…]+\w* into [A-Za-z…][\w…]* — I am thinking though, that ‘…’ should not be allowed for anything but the first character
• change a pattern of the fork: \w+ \.? \w* into \w+ (\. \w*)?

Both of the above would previously result in potential really bad performance, because two greedy repeats basically matching the same thing, was after each other, and that leads to exponential time complexity in input size.


git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@6859 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2007-03-20 11:51:44 +00:00
duff d01c07ff38 • handle com.some.namespace.Function = test() { } — ticket 2629590E
git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@6787 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2007-03-12 14:44:56 +00:00
subtlegradient 0539e44989 Removed old bas scope
Set ⌥⇧: as the shortcut for object keys
Set the trigger for "for faster" to "for" to get the menu

git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@6595 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2007-02-15 04:34:38 +00:00
duff 9ec26daccc • recognize documentation comments (/** … */) — patch from Dave Grijalva
git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@6575 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2007-02-13 04:48:32 +00:00
subtlegradient 494487abe6 Fix for javascript "fred = (whatever)" being considered a function
git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@6341 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2006-12-12 21:11:31 +00:00
subtlegradient 1d19d9c169 Remove the rule that incorrectly turns anything with a dot before an = into a class. this grammar still needs some serious work imho.
git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@6257 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2006-11-28 03:07:25 +00:00
msheets 82f10d6ae3 Include the delimiters in the string.quoted.single scope rather than just the content.
git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@5998 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2006-11-07 22:05:57 +00:00
msheets bb4b016f32 • Change entity.name.object.js.firebug to entity.name.type.object.js.firebug
• Change entity.name.instance to entity.name.type.instance


git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@5728 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2006-10-29 20:27:04 +00:00
msheets 6fef2d6b80 Add more specific scopes for true|false|null:
constant.language.boolean.true.js, constant.language.boolean.false.js, constant.language.null.js

From james on the mailing list.


git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@5650 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2006-10-26 20:39:09 +00:00
msheets d60113b0ba • Added puctuation scopes.
• Change meta.delimiter.statement to punctuation.terminator.statement
• Better scope strings in meta.function.json
• Optimize a few of the larger regex matches.


git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@5373 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2006-10-05 02:56:50 +00:00
haraldmartin 9fff45d36d • Moved a lot of the generic JS stuff from the Prototype bundle to the JS bundle and removed duplicated rules.
• Improved some rules to catch more functions (like Object.myfunc = ...)

Some of the rules can be simplified but I'm not a regexp guru so if somebody want to make them shorter/easier/faster, go ahead :)

git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@5307 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2006-09-26 14:07:21 +00:00
duff 4a0e3a094f • forgot octal numbers (in strings) with the first digit higher than 3 (e.g. \57 or \7)
git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@5203 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2006-09-13 18:35:54 +00:00
duff b766a2309c • markup hex (\xHH) and octal (\377) sequences in strings
git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@5202 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2006-09-13 18:33:01 +00:00
duff 269f63f493 • allow whitespace before colon when declaring functions as ‘foo: function () { … }’
git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@4874 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2006-08-21 12:10:57 +00:00
msheets d526582b54 Move this & super to a new variable.language rule, though oddly best I can tell super doesn't exist in javascript outside some kind of extension?
git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@4734 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2006-08-14 08:14:15 +00:00
msheets ffed18bc0c Remove swallow use in favor of a constant.character.escape pattern.
git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@4645 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2006-08-10 05:04:18 +00:00