diff --git a/autotests/folding/test.js.fold b/autotests/folding/test.js.fold --- a/autotests/folding/test.js.fold +++ b/autotests/folding/test.js.fold @@ -13,3 +13,11 @@ // Member objects: text after "." object.property instanceof Number; iden1.iden2 . iden3.class class; + +var escapes = "aa\b\n\0a\"a\x12a\32a\u{123}a\$\%\ \#\y\aaa\ +aaa"; +var octal = 0o124; +var bin = 0b1010; + +ლಠ益ಠლ.ñá = 42; +δ /No-RegExp/ diff --git a/autotests/folding/test.jsx.fold b/autotests/folding/test.jsx.fold --- a/autotests/folding/test.jsx.fold +++ b/autotests/folding/test.jsx.fold @@ -2,15 +2,15 @@ * URL: https://reactjs.org/*/ import React from 'react'; -import { PhotoStory, VideoStory } from './stories'; +import { PhotoStory, VideoStory } from './stories'; function Story(props) { const SpecificStory = components[props.storyType]; return story={ props.story } attr2="&ref;" attr3="Hello\n" />; -} +} function - attr1={ /> function return class var 0x123 { } &noRef; hello() React.Component() } attr2="&ref;"> + attr1={ /> function return class var 0x123 { } &noRef; hello() React.Component() } attr2="&ref;"> /* no comment*/ function /> return class var 0x123 &ref; hello() React.Component() ./> anyWord /> { function return class var 0x123 hello() React.Component() } @@ -27,14 +27,14 @@ /* comment */ >> { /* comment */ /> - word . } + word . } return /* comment multiline */ /> /* comment */ /> && /*comment*/ /> & /*comment*/ /> -{ >Hello> } +{ >Hello> } ? />; [ /> ( /> ,/> =/> diff --git a/autotests/html/test.js.html b/autotests/html/test.js.html --- a/autotests/html/test.js.html +++ b/autotests/html/test.js.html @@ -19,4 +19,12 @@ // Member objects: text after "." object.property instanceof Number; iden1.iden2 . iden3.class class; + +var escapes = "aa\b\n\0a\"a\x12a\32a\u{123}a\$\%\ \#\y\aaa\ +aaa"; +var octal = 0o124; +var bin = 0b1010; + +ლಠ益ಠლ.ñá = 42; +δ /No-RegExp/ diff --git a/autotests/input/test.js b/autotests/input/test.js --- a/autotests/input/test.js +++ b/autotests/input/test.js @@ -13,3 +13,11 @@ // Member objects: text after "." object.property instanceof Number; iden1.iden2 . iden3.class class; + +var escapes = "aa\b\n\0a\"a\x12a\32a\u{123}a\$\%\ \#\y\aaa\ +aaa"; +var octal = 0o124; +var bin = 0b1010; + +ლಠ益ಠლ.ñá = 42; +δ /No-RegExp/ diff --git a/autotests/reference/test.js.ref b/autotests/reference/test.js.ref --- a/autotests/reference/test.js.ref +++ b/autotests/reference/test.js.ref @@ -5,11 +5,19 @@
function fun()
{
- var boo = { 'key': [ 1, 2.0, 3.0e1, 004, 0x5 ] };
+ var boo = { 'key': [ 1, 2.0, 3.0e1, 004, 0x5 ] };
}

class MyClass; // reserved keywords

// Member objects: text after "."
object.property instanceof Number;
iden1.iden2 . iden3.class class;
+
+var escapes = "aa\b\n\0a\"a\x12a\32a\u{123}a\$\%\ \#\y\aaa\
+aaa";
+var octal = 0o124;
+var bin = 0b1010;
+
+ლಠ益ಠლ.ñá = 42;
+δ /No-RegExp/
diff --git a/autotests/reference/test.qml.ref b/autotests/reference/test.qml.ref --- a/autotests/reference/test.qml.ref +++ b/autotests/reference/test.qml.ref @@ -17,7 +17,7 @@ Rectangle {
id: sub
width: 0x10
- height: 007
+ height: 007
objectName: 'single quote'
}
}
diff --git a/data/syntax/javascript-react.xml b/data/syntax/javascript-react.xml --- a/data/syntax/javascript-react.xml +++ b/data/syntax/javascript-react.xml @@ -24,15 +24,16 @@ This file is an extension of the JavaScript highlighter (javascript.xml). Based on the XML syntax highlighting (v7), by Wilbert Berendsen - (wilbert@kde.nl), and the TypeScript React grammar files of VS Code, + (wilbert@kde.nl), and the TypeScript React grammar files, available at: https://github.com/Microsoft/TypeScript-TmLanguage Change log: - * v1 [2018-06-20]: Initial version + * v2 [2018-08-18]: Remove "Conditional Expression" context. + * v1 [2018-06-20]: Initial version --> - @@ -58,22 +59,21 @@ - + + - - - - + + @@ -84,11 +84,11 @@ - + + - @@ -104,9 +104,6 @@ - - - @@ -259,3 +256,4 @@ + diff --git a/data/syntax/javascript.xml b/data/syntax/javascript.xml --- a/data/syntax/javascript.xml +++ b/data/syntax/javascript.xml @@ -1,11 +1,14 @@ - + +]> - @@ -91,8 +94,11 @@ - + + + + @@ -106,11 +112,13 @@ - + - + + + @@ -134,9 +142,9 @@ - + - + @@ -156,27 +164,35 @@ - + - - - + - - - + + + + + + + + + + + + + + - - + @@ -237,8 +253,10 @@ + + @@ -250,6 +268,7 @@ +