Implement preliminary form of structured compare. No boxes, vectors or strings yet.

This commit is contained in:
Graydon Hoare 2010-09-21 11:47:10 -07:00
parent 72cc89c8c3
commit 9f0a6c21b2
5 changed files with 202 additions and 78 deletions

View file

@ -50,8 +50,7 @@ state fn new_parser(session.session sess, str path) -> parser {
}
state fn expect(parser p, token.token t) {
// FIXME: comparing tags would be good. One of these days.
if (true /* p.peek() == t */) {
if (p.peek() == t) {
p.bump();
} else {
let str s = "expecting ";