blob: 24105493506284f28cae3ebc44fd55239a951cbd (
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.getDeclaration().getId());
}
int referentId;
@Override
public <T> T accept(ExpressionNodeVisitor<T> visitor) {
return visitor.visit(this);
}
}
|