コード例 #1
0
ファイル: parser.py プロジェクト: gando999/scubble
def p_instance(p):
    '''instance : NEW ID'''
    global current_scope
    node = ASTNode('INSTANCE', leaf=p[2])
    node.scope = current_scope
    p[0] = node
コード例 #2
0
ファイル: parser.py プロジェクト: gando999/scubble
def p_call(p):
    '''call : ID paren_expr_list
            | ID paren_empty_list'''
    node = ASTNode('CALL', children=[p[1], p[2]])
    node.scope = current_scope
    p[0] = node