1
0
mirror of https://github.com/DanilaFe/abacus synced 2024-06-30 06:40:58 -07:00
Abacus/core/src/main/java/org/nwapw/abacus/lexing/pattern/LinkNode.java

21 lines
469 B
Java
Raw Normal View History

package org.nwapw.abacus.lexing.pattern;
import java.util.Collection;
2017-07-25 22:47:48 -07:00
/**
* A node that is used as structural glue in pattern compilation.
2017-07-30 21:11:32 -07:00
*
2017-07-25 22:47:48 -07:00
* @param <T> the type that's used to tell which pattern this node belongs to.
*/
public class LinkNode<T> extends PatternNode<T> {
@Override
public void addInto(Collection<PatternNode<T>> into) {
2017-07-30 21:11:32 -07:00
if (!into.contains(this)) {
into.add(this);
addOutputsInto(into);
}
}
}