Add pass statement just for compatibility.
This commit is contained in:
parent
b98751d991
commit
fdc1a500fe
@ -1625,6 +1625,8 @@ static void statement() {
|
||||
breakStatement();
|
||||
} else if (match(TOKEN_CONTINUE)) {
|
||||
continueStatement();
|
||||
} else if (match(TOKEN_PASS)) {
|
||||
/* Do nothing. */
|
||||
} else {
|
||||
expressionStatement();
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ let FLAG_ESCAPE = 13
|
||||
let keywords = [
|
||||
'and','class','def','else','export','for','if','in','import','let','not',
|
||||
'or','return','while','try','except','raise','continue','break','as','from',
|
||||
'elif', 'lambda'
|
||||
'elif', 'lambda', 'pass',
|
||||
]
|
||||
|
||||
let types = [
|
||||
|
1
rline.c
1
rline.c
@ -535,6 +535,7 @@ char * syn_krk_keywords[] = {
|
||||
"and","class","def","else","for","if","in","import","del",
|
||||
"let","not","or","return","while","try","except","raise",
|
||||
"continue","break","as","from","elif","lambda","with","is",
|
||||
"pass",
|
||||
NULL
|
||||
};
|
||||
|
||||
|
@ -234,6 +234,7 @@ static KrkTokenType identifierType() {
|
||||
case 'n': return checkKeyword(1, "ot", TOKEN_NOT);
|
||||
case 'N': return checkKeyword(1, "one", TOKEN_NONE);
|
||||
case 'o': return checkKeyword(1, "r", TOKEN_OR);
|
||||
case 'p': return checkKeyword(1, "ass", TOKEN_PASS);
|
||||
case 'r': if (MORE(1)) switch (scanner.start[1]) {
|
||||
case 'e': return checkKeyword(2, "turn", TOKEN_RETURN);
|
||||
case 'a': return checkKeyword(2, "ise", TOKEN_RAISE);
|
||||
|
Loading…
Reference in New Issue
Block a user