Commit f003f673 authored by Johannes Roith's avatar Johannes Roith

Fix.

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