/\s+(?=[[(])/,// followed by at least one space and `[` or `(`
],
beginScope:{2:"keyword",}
};
constEND={
begin:[
/^\s*/,// Is first token on the line
/end/,
/\s+/,
/(extension\b)?/,// `extension` is the only marker that follows an `end` that cannot be captured by another rule.
],
beginScope:{
2:"keyword",
4:"keyword",
}
};
// TODO: use negative look-behind in future
// /(?<!\.)\binline(?=\s)/
constINLINE_MODES=[
{match:/\.inline\b/},
{
begin:/\binline(?=\s)/,
keywords:'inline'
}
];
constUSING_PARAM_CLAUSE={
begin:[
/\(\s*/,// Opening `(` of a parameter or argument list
/using/,
/\s+(?!\))/,// Spaces not followed by `)`
],
beginScope:{2:"keyword",}
};
return{
name:'Scala',
keywords:{
literal:'true false null',
keyword:'type yield lazy override def with val var sealed abstract private trait object if then forSome for while do throw finally protected extends import final return else break new catch super class case package default try this match continue throws implicit export enum given transparent'