@@ -158,14 +158,12 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
158
158
} else if ( wordRE . test ( ch ) ) {
159
159
stream . eatWhile ( wordRE ) ;
160
160
var word = stream . current ( )
161
- if ( state . lastType != "." ) {
162
- if ( keywords . propertyIsEnumerable ( word ) ) {
163
- var kw = keywords [ word ]
164
- return ret ( kw . type , kw . style , word )
165
- }
166
- if ( word == "async" && stream . match ( / ^ ( \s | \/ \* .* ?\* \/ ) * [ \[ \( \w ] / , false ) )
167
- return ret ( "async" , "keyword" , word )
161
+ if ( keywords . propertyIsEnumerable ( word ) ) {
162
+ var kw = keywords [ word ]
163
+ return ret ( kw . type , kw . style , word )
168
164
}
165
+ if ( state . lastType != "." && word == "async" && stream . match ( / ^ ( \s | \/ \* .* ?\* \/ ) * [ \[ \( \w ] / , false ) )
166
+ return ret ( "async" , "keyword" , word )
169
167
return ret ( "variable" , "variable" , word )
170
168
}
171
169
}
@@ -285,6 +283,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
285
283
if ( combinator ( type , content ) ) {
286
284
while ( cc . length && cc [ cc . length - 1 ] . lex )
287
285
cc . pop ( ) ( ) ;
286
+ if ( style ?. slice ( 0 , 2 ) === "p5" ) return style ;
288
287
if ( cx . marked ) return cx . marked ;
289
288
if ( type == "variable" && inScope ( state , content ) ) return "variable-2" ;
290
289
return style ;
0 commit comments