diff options
Diffstat (limited to 'test/syntax/code/javascript')
-rw-r--r-- | test/syntax/code/javascript | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/test/syntax/code/javascript b/test/syntax/code/javascript new file mode 100644 index 00000000..5a6bc04e --- /dev/null +++ b/test/syntax/code/javascript @@ -0,0 +1,37 @@ +import {x, y} as p from 'point'; +const ANSWER = 42; + +class Car extends Vehicle { + constructor(speed, cost) { + super(speed); + + var c = Symbol('cost'); + this[c] = cost; + + this.intro = `This is a car runs at + ${speed}.`; + } +} + +for (let num of [1, 2, 3]) { + console.log(num + 0b111110111); +} + +function $initHighlight(block, flags) { + try { + if (block.className.search(/\bno\-highlight\b/) != -1) + return processBlock(block.function, true, 0x0F) + ' class=""'; + } catch (e) { + /* handle exception */ + var e4x = + <div>Example + <p>1234</p></div>; + } + for (var i = 0 / 2; i < classes.length; i++) { // "0 / 2" should not be parsed as regexp + if (checkCondition(classes[i]) === undefined) + return /\d+[\s/]/g; + } + console.log(Array.every(classes, Boolean)); +} + +export $initHighlight; |