// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
var mode = CodeMirror.getMode({indentUnit: 2}, "dylan");
function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }
'[comment // This is a line comment]',
'[comment /* This is a block comment */]',
'[comment /* This is a multi]',
'[comment line comment]',
'[comment /* And this is a /*]',
'[comment /* nested */ comment */]');
'[operator -][variable a]',
'[operator -] [variable a]',
'[operator ~][variable a]',
'[operator ~] [variable a]');
'[variable a] [operator +] [variable b]',
'[variable a] [operator -] [variable b]',
'[variable a] [operator *] [variable b]',
'[variable a] [operator /] [variable b]',
'[variable a] [operator ^] [variable b]',
'[variable a] [operator =] [variable b]',
'[variable a] [operator ==] [variable b]',
'[variable a] [operator ~=] [variable b]',
'[variable a] [operator ~==] [variable b]',
'[variable a] [operator <] [variable b]',
'[variable a] [operator <=] [variable b]',
'[variable a] [operator >] [variable b]',
'[variable a] [operator >=] [variable b]',
'[variable a] [operator &] [variable b]',
'[variable a] [operator |] [variable b]',
'[variable a] [operator :=] [variable b]');
MT('characters_and_strings',
'[string "More escaped characters: \\\\\\\\ \\\\a \\\\b \\\\e \\\\f \\\\n \\\\r \\\\t \\\\0 ..."]');
'[bracket #(][number 1][bracket )]',
'[bracket [[][number 1][punctuation ,] [number 3][bracket ]]]',
'[keyword if] [bracket (][variable foo][bracket )]',
'[bracket (][number 1][bracket )]',
'[bracket [[][number 1][bracket ]]]');
'[atom #f]', '[atom #F]',
'[atom #t]', '[atom #T]',