Beispiel #1
0
 def p_statement_return(p):
     """ statement : RETURN expression SEMICOLON """
     p[0] = AST.InstructionStatement(p.linespan(0), p[1], [p[2]])
Beispiel #2
0
 def p_statement_break(p):
     """ statement : BREAK SEMICOLON """
     p[0] = AST.InstructionStatement(p.linespan(0), p[1], [])
Beispiel #3
0
 def p_statement_continue(p):
     """ statement : CONTINUE SEMICOLON """
     p[0] = AST.InstructionStatement(p.linespan(0), p[1], [])
Beispiel #4
0
 def p_statement_print(p):
     """ statement : PRINT comma_list SEMICOLON """
     p[0] = AST.InstructionStatement(p.linespan(0), p[1], p[2])