summaryrefslogtreecommitdiff
path: root/src/token.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2010-09-05 01:38:47 -0400
committerJohn Wiegley <johnw@newartisans.com>2010-09-05 01:38:47 -0400
commite162455ebb545ea33580e58f52ebe424ef9e68fa (patch)
treedf9c98fb39f31b9003db07d7806815bf71031a2d /src/token.h
parent9fcf48482626f20151d75a2ebb81371b45d4540a (diff)
downloadfork-ledger-e162455ebb545ea33580e58f52ebe424ef9e68fa.tar.gz
fork-ledger-e162455ebb545ea33580e58f52ebe424ef9e68fa.tar.bz2
fork-ledger-e162455ebb545ea33580e58f52ebe424ef9e68fa.zip
Minor simplifications to valexpr parser
The most significant change is the way CONS sequences are parsed, and that now instead of =/:=, the operators are ==/=.
Diffstat (limited to 'src/token.h')
-rw-r--r--src/token.h11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/token.h b/src/token.h
index aae73837..28e29752 100644
--- a/src/token.h
+++ b/src/token.h
@@ -94,7 +94,7 @@ struct expr_t::token_t : public noncopyable
} kind;
- char symbol[3];
+ char symbol[6];
value_t value;
std::size_t length;
@@ -113,13 +113,10 @@ struct expr_t::token_t : public noncopyable
}
void clear() {
- kind = UNKNOWN;
- length = 0;
- value = NULL_VALUE;
-
+ kind = UNKNOWN;
+ length = 0;
+ value = NULL_VALUE;
symbol[0] = '\0';
- symbol[1] = '\0';
- symbol[2] = '\0';
}
int parse_reserved_word(std::istream& in);