Changeset 3007c0b


Ignore:
Timestamp:
Jul 12, 2018, 11:38:06 AM (6 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
Children:
d53772d
Parents:
0fc52b6
git-author:
Rob Schluntz <rschlunt@…> (07/12/18 11:37:30)
git-committer:
Rob Schluntz <rschlunt@…> (07/12/18 11:38:06)
Message:

Add error checks in the parser for generic parameters that are expressions [fixes #99]

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/parser.yy

    r0fc52b6 r3007c0b  
    22942294                { $$ = new ExpressionNode( new TypeExpr( maybeMoveBuildType( $1 ) ) ); }
    22952295        | assignment_expression
     2296                { SemanticError( yylloc, toString("Expression generic parameters are currently unimplemented: ", $1->build()) ); $$ = nullptr; }
    22962297        | type_list ',' type
    22972298                { $$ = (ExpressionNode *)( $1->set_last( new ExpressionNode( new TypeExpr( maybeMoveBuildType( $3 ) ) ) ) ); }
    22982299        | type_list ',' assignment_expression
    2299                 { $$ = (ExpressionNode *)( $1->set_last( $3 )); }
     2300                { SemanticError( yylloc, toString("Expression generic parameters are currently unimplemented: ", $3->build()) ); $$ = nullptr; }
     2301                // { $$ = (ExpressionNode *)( $1->set_last( $3 )); }
    23002302        ;
    23012303
Note: See TracChangeset for help on using the changeset viewer.