From 84780270f9bc427f6edcd295b68ffcf6b911baf6 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Mon, 6 Sep 2010 00:33:03 -0400 Subject: Added initial support for lambda functions --- src/token.cc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/token.cc') 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(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 '<': -- cgit v1.2.3