Ignoring literals.
parent
8a0abd070e
commit
0ec3b80d6c
|
@ -218,7 +218,7 @@ const Parser = struct {
|
|||
},
|
||||
|
||||
else => {
|
||||
std.debug.print("token: {}\n", .{p.token_ids[token]});
|
||||
p.say("unexpected token: {}\n", .{p.token_ids[token]});
|
||||
continue;
|
||||
},
|
||||
}
|
||||
|
@ -297,6 +297,14 @@ const Parser = struct {
|
|||
// p.say("within a node, token: {}\n", .{p.giveTokenContent(token)});
|
||||
switch (p.token_ids[token]) {
|
||||
|
||||
.Keyword_null,
|
||||
.StringLiteral,
|
||||
.FloatLiteral,
|
||||
.IntegerLiteral => {
|
||||
p.say("reading (and ignoring) a literal: {}\n", .{p.giveTokenContent(token)});
|
||||
continue;
|
||||
},
|
||||
|
||||
.Identifier => {
|
||||
const following = p.nextToken();
|
||||
switch (p.token_ids[following]) {
|
||||
|
|
Loading…
Reference in New Issue