io.github.danielnaczo.python3parser.model.expr.atoms.Name Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of python3parser Show documentation
Show all versions of python3parser Show documentation
A Java-based Python3-Parser.
The newest version!
package io.github.danielnaczo.python3parser.model.expr.atoms;
import io.github.danielnaczo.python3parser.model.Identifier;
import io.github.danielnaczo.python3parser.model.expr.Expression;
import io.github.danielnaczo.python3parser.visitors.basic.Python3ASTVisitor;
import java.util.Objects;
public class Name extends Expression {
static int PRECEDENCE = 190;
public int getPrecedence() {
return PRECEDENCE;
}
Identifier id;
public Name(Identifier id) {
this.id = id;
}
public Name(String name) {
this.id = new Identifier(name);
}
public Identifier getId() {
return id;
}
public void setId(Identifier id) {
this.id = id;
}
public R accept(Python3ASTVisitor visitor, P param) {
return visitor.visitName(this, param);
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Name name = (Name) o;
return Objects.equals(id, name.id);
}
@Override
public int hashCode() {
return Objects.hash(id);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy