@Override public void defExtent(JPNode extentNode) { LOG.trace("Entering defExtent {}", extentNode); Primative primative = (Primative) currSymbol; JPNode exprNode = extentNode.getFirstChild(); // If there is no expression node, then it's an "indeterminate extent". // If it's not a numeric literal, then we give up. if (exprNode == null || exprNode.getType() != ProParserTokenTypes.NUMBER) { primative.setExtent(-1); } else { primative.setExtent(Integer.parseInt(exprNode.getText())); } }
@Override public void defExtent(JPNode extentNode) { LOG.trace("Entering defExtent {}", extentNode); Primative primative = (Primative) currSymbol; JPNode exprNode = extentNode.getFirstChild(); // If there is no expression node, then it's an "indeterminate extent". // If it's not a numeric literal, then we give up. if (exprNode == null || exprNode.getType() != ProParserTokenTypes.NUMBER) { primative.setExtent(-1); } else { primative.setExtent(Integer.parseInt(exprNode.getText())); } }