diff options
author | John Hodge <tpg@mutabah.net> | 2016-02-27 15:06:21 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-02-27 15:06:21 +0800 |
commit | 85a756b47e55373497a20f1d19a7b4eec12ce928 (patch) | |
tree | d0668b3772065c5f4e15c5a5dbbe4d05b80efc4f /src | |
parent | 404da3f27a39e0e0b1de17e0175b4da3d4287817 (diff) | |
download | mrust-85a756b47e55373497a20f1d19a7b4eec12ce928.tar.gz |
Parse - Support hugely nested parens
Diffstat (limited to 'src')
-rw-r--r-- | src/include/debug.hpp | 2 | ||||
-rw-r--r-- | src/parse/expr.cpp | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/include/debug.hpp b/src/include/debug.hpp index d11af652..b8c54440 100644 --- a/src/include/debug.hpp +++ b/src/include/debug.hpp @@ -6,7 +6,7 @@ extern int g_debug_indent_level; #ifndef DISABLE_DEBUG -#define INDENT() do { g_debug_indent_level += 1; assert(g_debug_indent_level<100); } while(0) +#define INDENT() do { g_debug_indent_level += 1; assert(g_debug_indent_level<300); } while(0) #define UNINDENT() do { g_debug_indent_level -= 1; } while(0) #define DEBUG(ss) do{ if(debug_enabled()) { debug_output(g_debug_indent_level, __FUNCTION__) << ss << ::std::endl; } } while(0) #else diff --git a/src/parse/expr.cpp b/src/parse/expr.cpp index 9330d925..42347a2f 100644 --- a/src/parse/expr.cpp +++ b/src/parse/expr.cpp @@ -544,7 +544,7 @@ ExprNodeP Parse_Stmt(TokenStream& lex) // 0: Assign
ExprNodeP Parse_Expr0(TokenStream& lex)
{
- TRACE_FUNCTION;
+ //TRACE_FUNCTION;
Token tok;
::AST::MetaItems expr_attrs;
@@ -1098,7 +1098,7 @@ ExprNodeP Parse_ExprVal(TokenStream& lex) CLEAR_PARSE_FLAG(lex, disallow_struct_literal);
lex.putback(tok);
- ExprNodeP rv = Parse_Stmt(lex);
+ ExprNodeP rv = Parse_Expr0(lex);
if( GET_TOK(tok, lex) == TOK_COMMA ) {
::std::vector<ExprNodeP> ents;
ents.push_back( ::std::move(rv) );
@@ -1106,7 +1106,7 @@ ExprNodeP Parse_ExprVal(TokenStream& lex) if( GET_TOK(tok, lex) == TOK_PAREN_CLOSE )
break;
lex.putback(tok);
- ents.push_back( Parse_Stmt(lex) );
+ ents.push_back( Parse_Expr0(lex) );
} while( GET_TOK(tok, lex) == TOK_COMMA );
rv = NEWNODE( AST::ExprNode_Tuple, ::std::move(ents) );
}
|