for (final LeafPattern p : m.getCollected()) { u.put(p.getName(), p.getValue());
for (final LeafPattern p : m.getCollected()) { u.put(p.getName(), p.getValue());
@Override protected MatchResult match(final List<LeafPattern> left, List<LeafPattern> collected) { if (collected == null) { collected = list(); } List<LeafPattern> l = left; List<LeafPattern> c = collected; for (final Pattern pattern : getChildren()) { final MatchResult m = pattern.match(l, c); l = m.getLeft(); c = m.getCollected(); if (!m.matched()) { return new MatchResult(false, left, collected); } } return new MatchResult(true, l, c); } }
@Override protected MatchResult match(final List<LeafPattern> left, List<LeafPattern> collected) { if (collected == null) { collected = list(); } List<LeafPattern> l = left; List<LeafPattern> c = collected; for (final Pattern pattern : getChildren()) { final MatchResult m = pattern.match(l, c); l = m.getLeft(); c = m.getCollected(); if (!m.matched()) { return new MatchResult(false, left, collected); } } return new MatchResult(true, l, c); } }
@Override protected MatchResult match(List<LeafPattern> left, List<LeafPattern> collected) { if (collected == null) { collected = list(); } for (final Pattern pattern : getChildren()) { final MatchResult u = pattern.match(left, collected); left = u.getLeft(); collected = u.getCollected(); } return new MatchResult(true, left, collected); } }
@Override protected MatchResult match(List<LeafPattern> left, List<LeafPattern> collected) { if (collected == null) { collected = list(); } for (final Pattern pattern : getChildren()) { final MatchResult u = pattern.match(left, collected); left = u.getLeft(); collected = u.getCollected(); } return new MatchResult(true, left, collected); } }