}
}
} else {
+ if (token > TokenNameKEYWORD) {
+ throwSyntaxError(
+ "Don't use keyword for class declaration [" + token + "].");
+ }
throwSyntaxError("Class name expected after keyword 'class'.");
}
}
} else {
getNextToken();
}
+ } else {
+ if (token > TokenNameKEYWORD) {
+ throwSyntaxError(
+ "Don't use keyword for function declaration [" + token + "].");
+ }
+ throwSyntaxError("Function name expected after keyword 'function'.");
}
}
//