summaryrefslogtreecommitdiff
path: root/src/token.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/token.cc')
-rw-r--r--src/token.cc11
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 '<':