diff options
author | John Hodge (sonata) <tpg@mutabah.net> | 2015-01-05 08:43:45 +0800 |
---|---|---|
committer | John Hodge (sonata) <tpg@mutabah.net> | 2015-01-05 08:43:45 +0800 |
commit | eac8e3d68b9ca67f97c1f9aedef01e8e93cde323 (patch) | |
tree | 47fc3f527b7f3d03718277347e13c3ee4bb779d2 /src/parse | |
parent | 4a9e7dc0e4976c03a8dbceeacc5e474509b237f9 (diff) | |
download | mrust-eac8e3d68b9ca67f97c1f9aedef01e8e93cde323.tar.gz |
Implementing path lookup (bottom level of resolve)
Diffstat (limited to 'src/parse')
-rw-r--r-- | src/parse/expr.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/parse/expr.cpp b/src/parse/expr.cpp index fd6f14b8..478673e3 100644 --- a/src/parse/expr.cpp +++ b/src/parse/expr.cpp @@ -402,7 +402,7 @@ ExprNodeP Parse_ExprFC(TokenStream& lex) switch(GET_TOK(tok, lex))
{
case TOK_PAREN_OPEN:
- // Function call
+ // Expression method call
lex.putback(tok);
val = NEWNODE( AST::ExprNode_CallObject, ::std::move(val), Parse_ParenList(lex) );
break;
@@ -411,6 +411,12 @@ ExprNodeP Parse_ExprFC(TokenStream& lex) // TODO: What about tuple indexing?
GET_CHECK_TOK(tok, lex, TOK_IDENT);
val = NEWNODE( AST::ExprNode_Field, ::std::move(val), ::std::string(tok.str()) );
+ //if( GET_TOK(tok, lex) == TOK_PAREN_OPEN || tok.type() == TOK_DOUBLE_COLON ) {
+ // throw ParseError::Todo("method calls");
+ //}
+ //else {
+ // lex.putback(tok);
+ //}
break;
default:
lex.putback(tok);
|