diff options
author | John Wiegley <johnw@newartisans.com> | 2010-09-06 00:33:03 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2010-09-06 00:56:00 -0400 |
commit | 84780270f9bc427f6edcd295b68ffcf6b911baf6 (patch) | |
tree | 7b151bbc02ab30bad5c3636cfefd4d5cd4a419da /src/token.cc | |
parent | e162455ebb545ea33580e58f52ebe424ef9e68fa (diff) | |
download | fork-ledger-84780270f9bc427f6edcd295b68ffcf6b911baf6.tar.gz fork-ledger-84780270f9bc427f6edcd295b68ffcf6b911baf6.tar.bz2 fork-ledger-84780270f9bc427f6edcd295b68ffcf6b911baf6.zip |
Added initial support for lambda functions
Diffstat (limited to 'src/token.cc')
-rw-r--r-- | src/token.cc | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/token.cc b/src/token.cc index be39205c..199c3b3c 100644 --- a/src/token.cc +++ b/src/token.cc @@ -269,6 +269,15 @@ void expr_t::token_t::next(std::istream& in, const parse_flags_t& pflags, case '-': in.get(c); + c = static_cast<char>(in.peek()); + if (c == '>') { + in.get(c); + symbol[1] = c; + symbol[2] = '\0'; + kind = ARROW; + length = 2; + break; + } kind = MINUS; break; case '+': @@ -329,7 +338,7 @@ void expr_t::token_t::next(std::istream& in, const parse_flags_t& pflags, length = 2; break; } - kind = DEFINE; + kind = ASSIGN; break; case '<': |