public static void Walk([NotNull] ArrayPatternNode arrayPattern, [NotNull] IList <string> list) { foreach (var element in arrayPattern.Elements) { if (element != null) { Walk(element, list); } } }
public override void Visit(ArrayPatternNode node) { base.Visit(node); var alias = node.Alias; if (alias != null && !alias.NameToken.IsMissing) { _scope.Define(alias.MutKeywordToken != null ? SyntaxSymbolKind.Mutable : SyntaxSymbolKind.Immutable, null, alias, alias.NameToken.Text); } }
public override TreePattern Visit(ArrayPatternNode node, TreePattern state) { var elems = ImmutableArray <TreePattern> .Empty; foreach (var elem in node.Elements.Nodes) { elems = elems.Add(Visit(elem)); } return(new TreeArrayPattern(CreateAlias(node), elems, node.Remainder is ArrayPatternRemainderNode r ? Visit(r.Pattern) : null)); }