Ejemplo n.º 1
0
def build_tuple(state, arg):
    if arg == 0:
        state.stack.append(Tuple[()])
    else:
        state.stack[-arg:] = [
            Tuple[[Const.unwrap(t) for t in state.stack[-arg:]]]
        ]
Ejemplo n.º 2
0
def unary(state, unused_arg):
  state.stack[-1] = Const.unwrap(state.stack[-1])
Ejemplo n.º 3
0
def build_tuple(state, arg):
  if arg == 0:
    state.stack.append(Tuple[()])
  else:
    state.stack[-arg:] = [Tuple[[Const.unwrap(t) for t in state.stack[-arg:]]]]
Ejemplo n.º 4
0
def list_append(state, arg):
  state.stack[-arg] = List[Union[element_type(state.stack[-arg]),
                                 Const.unwrap(state.stack.pop())]]
Ejemplo n.º 5
0
def unary(state, unused_arg):
    state.stack[-1] = Const.unwrap(state.stack[-1])
Ejemplo n.º 6
0
def list_append(state, arg):
    state.stack[-arg] = List[Union[element_type(state.stack[-arg]),
                                   Const.unwrap(state.stack.pop())]]