Mercurial > kallithea
view kallithea/public/codemirror/mode/javascript/test.js @ 4539:b4d77d1c710c
codemirror: move everything to separate codemirror folder - splitting it up in css and js serves no purpose
- but it should perhaps not show up directly in /codemirror ...
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Wed, 24 Sep 2014 14:24:40 +0200 |
parents | kallithea/public/js/mode/javascript/test.js@d1addaf7a91e |
children |
line wrap: on
line source
(function() { var mode = CodeMirror.getMode({indentUnit: 2}, "javascript"); function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); } MT("locals", "[keyword function] [variable foo]([def a], [def b]) { [keyword var] [def c] = [number 10]; [keyword return] [variable-2 a] + [variable-2 c] + [variable d]; }"); MT("comma-and-binop", "[keyword function](){ [keyword var] [def x] = [number 1] + [number 2], [def y]; }"); })();