parseExpression method

Expression parseExpression({
  1. bool allowIn = true,
})

Implementation

Expression parseExpression({bool allowIn = true}) {
  int start = token?.startOffset??0;
  Expression exp = parseAssignment(allowIn: allowIn);
  if (token?.type == Token.COMMA) {
    List<Expression> expressions = <Expression>[exp];
    while (token?.type == Token.COMMA) {
      next();
      expressions.add(parseAssignment(allowIn: allowIn));
    }
    exp = new SequenceExpression(expressions)
      ..start = start
      ..end = endOffset
      ..line = expressions.first.line;
  }
  return exp;
}