Compiler/lexical analyzer: Difference between revisions

Content added Content deleted
No edit summary
No edit summary
Line 3,352: Line 3,352:
Token char_lit(int line, int pos) {
Token char_lit(int line, int pos) {
char c = getNextChar(); // skip opening quote
char c = getNextChar(); // skip opening quote
int n = 0;
int n = (int)c;
if (c == '\'') {
if (c == '\'') {
error(line, pos, "empty character constant");
error(line, pos, "empty character constant");