File modules/editor/codemirror/mode/python/test.min.js

Last commit: Tue May 22 22:39:52 2018 +0200	Jan Dankert	Fix für PHP 7.2: 'Object' darf nun nicht mehr als Klassennamen verwendet werden. AUCH NICHT IN EINEM NAMESPACE! WTF, wozu habe ich das in einen verfickten Namespace gepackt? Wozu soll der sonst da sein??? Amateure. Daher nun notgedrungen unbenannt in 'BaseObject'.
1 // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 // Distributed under an MIT license: http://codemirror.net/LICENSE 3 4 (function() { 5 var mode = CodeMirror.getMode({indentUnit: 4}, 6 {name: "python", 7 version: 3, 8 singleLineStringErrors: false}); 9 function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); } 10 11 // Error, because "foobarhello" is neither a known type or property, but 12 // property was expected (after "and"), and it should be in parentheses. 13 MT("decoratorStartOfLine", 14 "[meta @dec]", 15 "[keyword def] [def function]():", 16 " [keyword pass]"); 17 18 MT("decoratorIndented", 19 "[keyword class] [def Foo]:", 20 " [meta @dec]", 21 " [keyword def] [def function]():", 22 " [keyword pass]"); 23 24 MT("matmulWithSpace:", "[variable a] [operator @] [variable b]"); 25 MT("matmulWithoutSpace:", "[variable a][operator @][variable b]"); 26 MT("matmulSpaceBefore:", "[variable a] [operator @][variable b]"); 27 var before_equal_sign = ["+", "-", "*", "/", "=", "!", ">", "<"]; 28 for (var i = 0; i < before_equal_sign.length; ++i) { 29 var c = before_equal_sign[i] 30 MT("before_equal_sign_" + c, "[variable a] [operator " + c + "=] [variable b]"); 31 } 32 33 MT("fValidStringPrefix", "[string f'this is a {formatted} string']"); 34 MT("uValidStringPrefix", "[string u'this is an unicode string']"); 35 })();
Download modules/editor/codemirror/mode/python/test.min.js
History Tue, 22 May 2018 22:39:52 +0200 Jan Dankert Fix für PHP 7.2: 'Object' darf nun nicht mehr als Klassennamen verwendet werden. AUCH NICHT IN EINEM NAMESPACE! WTF, wozu habe ich das in einen verfickten Namespace gepackt? Wozu soll der sonst da sein??? Amateure. Daher nun notgedrungen unbenannt in 'BaseObject'.