public UstNode VisitLiteralOrPatternId(DslParser.LiteralOrPatternIdContext context) { Token result; if (context.Id() != null) { result = ProcessId(context.Id()); } else { if (context.patternId().Length == 1) { var firstPatternId = context.patternId().First(); result = (IdToken)VisitPatternId(firstPatternId); } else { Token[] values = context.patternId().Select(literal => { return((IdToken)VisitPatternId(literal)); }).ToArray(); result = new PatternVarDef(GetNewVarDefName(), values, context.GetTextSpan()); } } return(result); }
public PatternUst VisitLiteralOrPatternId(DslParser.LiteralOrPatternIdContext context) { PatternUst result; if (context.Id() != null) { result = ProcessId(context.Id()); } else { result = ProcessPatternIds(context.patternId()); } return(result); }