Commit f003f673 authored by Johannes Roith's avatar Johannes Roith

Fix.

parent c8a7aebe
......@@ -64,15 +64,21 @@ public class Position {
// TODO: temporary hack for parser. Remove later!
public static Position fromComplexSymbolLeft(ComplexSymbol symbol) {
return new Position(symbol.xleft.getLine(),
symbol.xleft.getColumn(),
symbol.xleft.getOffset());
if (symbol.xleft != null) {
return new Position(symbol.xleft.getLine(),
symbol.xleft.getColumn(),
symbol.xleft.getOffset());
}
return null;
}
// TODO: temporary hack for parser. Remove later!
public static Position fromComplexSymbolRight(ComplexSymbol symbol) {
return new Position(symbol.xright.getLine(),
symbol.xright.getColumn(),
symbol.xright.getOffset());
if (symbol.xright != null) {
return new Position(symbol.xright.getLine(),
symbol.xright.getColumn(),
symbol.xright.getOffset());
}
return null;
}
}
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