Commit bb8a4c2b authored by Nguyen, Thien Minh's avatar Nguyen, Thien Minh
Browse files

Added the Semicolon token for entern declaration



I confused myself b/w the semicolon in g4 and the actual SEMICOLON token that is required.

Checking the generated llvm ir.

Signed-off-by: default avatarThien Nguyen <nguyentm@ornl.gov>
parent 2445d7bb
Loading
Loading
Loading
Loading
+1 −1

File changed.

Preview size limit exceeded, changes collapsed.

+278 −271

File changed.

Preview size limit exceeded, changes collapsed.

+1 −0
Original line number Diff line number Diff line
@@ -1732,6 +1732,7 @@ public:
    StatementContext* statement(size_t i);
    ReturnStatementContext *returnStatement();
    antlr4::tree::TerminalNode *EXTERN();
    antlr4::tree::TerminalNode *SEMICOLON();

    virtual void enterRule(antlr4::tree::ParseTreeListener *listener) override;
    virtual void exitRule(antlr4::tree::ParseTreeListener *listener) override;
+1 −1
Original line number Diff line number Diff line
@@ -480,7 +480,7 @@ subroutineBlock
    // Begin QCOR Extension
    // Allow a special 'extern' keyword in place of the subroutine definition 
    // to denote a declaration of an externally-provided quantum subroutine.
    | EXTERN
    | EXTERN SEMICOLON
    // End QCOR Extension
    ;