Exemplo n.º 1
0
    @Override
    protected void addForLineNumber(int $line, java.util.List<AbstractAST> $result) {
      if (getLocation().getBeginLine() == $line) {
        $result.add(this);
      }
      ISourceLocation $l;

      $l = constant.getLocation();
      if ($l.hasLineColumn() && $l.getBeginLine() <= $line && $l.getEndLine() >= $line) {
        constant.addForLineNumber($line, $result);
      }
      if ($l.getBeginLine() > $line) {
        return;
      }
    }
Exemplo n.º 2
0
    public IValue visitSourceLocation(ISourceLocation o) throws IOException {
      append('|');
      append(o.getURI().toString());
      append('|');

      if (o.hasOffsetLength()) {
        append('(');
        append(Integer.toString(o.getOffset()));
        append(',');
        append(Integer.toString(o.getLength()));

        if (o.hasLineColumn()) {
          append(',');
          append('<');
          append(Integer.toString(o.getBeginLine()));
          append(',');
          append(Integer.toString(o.getBeginColumn()));
          append('>');
          append(',');
          append('<');
          append(Integer.toString(o.getEndLine()));
          append(',');
          append(Integer.toString(o.getEndColumn()));
          append('>');
        }
        append(')');
      }
      return o;
    }