blob: 536a7c3351235bc7d34b9903a7f607a31fc2694b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
package org.zwobble.couscous.ast;
import org.zwobble.couscous.ast.visitors.ExpressionNodeVisitor;
import lombok.Value;
@Value
public class VariableReferenceNode implements ExpressionNode {
public static VariableReferenceNode reference(VariableNode variable) {
return new VariableReferenceNode(variable.getId());
}
int referentId;
@Override
public <T> T accept(ExpressionNodeVisitor<T> visitor) {
return visitor.visit(this);
}
}
|