Commit dfa18a96 authored by Alexandru Dura's avatar Alexandru Dura
Browse files

Add acessors for a node's start and end positons

parent 64498cc6
package se.lth.sep;
public abstract class NodeLabel {
int start, end;
// this node covers the symbols [start, end) in the token array, where
// the array is indexed from 0.
final int start, end;
protected NodeLabel(int start, int end) {
this.start = start;
this.end = end;
......@@ -19,4 +21,12 @@ public abstract class NodeLabel {
public abstract String prettyPrint(Grammar info);
public int getStart() {
return start;
public int getEnd() {
return end;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment