def splitVariable(s, pos, tokens):
  if len(tokens) == 1:
    # Handle unnamed variables
    name, typeDec, arrayDec = None, [], None
  elif type(tokens[-1]) == ParseResults:
    # Handle array declarations
    name, typeDec, arrayDec = tokens[-2], tokens[:-2], list(tokens[-1])
  else:
    name, typeDec, arrayDec = tokens[-1], tokens[:-1], None
  
  return (name, Type(" ".join(typeDec), arrayDec))
Returns an instance of the provided class, with its fields populated
dataset/ETHPy150Open skyostil/tracy/src/generator/Parser.py/splitVariable--crossover with--dataset/ETHPy150Open RobotWebTools/rosbridge_suite/rosbridge_library/src/rosbridge_library/internal/message_conversion.py/populate_instance