All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.deephaven.lang.generated.ChunkerAssign Maven / Gradle / Ivy

There is a newer version: 0.36.1
Show newest version
/* Generated By:JJTree: Do not edit this line. ChunkerAssign.java Version 7.0 */
/* JavaCCOptions:MULTI=true,NODE_USES_PARSER=true,VISITOR=true,TRACK_TOKENS=true,NODE_PREFIX=Chunker,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */
package io.deephaven.lang.generated;

public class ChunkerAssign extends ScopedNode {

  private Node value;

  public ChunkerAssign(int id) {
    super(id);
  }

  public ChunkerAssign(Chunker p, int id) {
    super(p, id);
  }


  /** Accept the visitor. **/
  public Object jjtAccept(ChunkerVisitor visitor, Object data) {

    return
    visitor.visitChunkerAssign(this, data);
  }

  public Node getValue() {
    return value;
  }

  public void setValue(Node value) {
    this.value = value;
  }

  @Override
  public boolean isAutocompleteTerminal() {
    return value == null; // only terminate autocomplete search if this assignment is incomplete.
    // otherwise, we'll want to search into the value as it has more context than "I want to reference anything"
  }

  public Token assignToken() {
    Token start = firstToken;
    while (start.kind != ChunkerConstants.ASSIGN) {
      start = start.next;
      assert start != null : "Assignment did not contain an ASSIGN token" + toSource();
    }
    return start;
  }

  public String getName() {
    // look backward from assignToken.
    Token tok = assignToken().prev;
    while (tok.kind == ChunkerConstants.WHITESPACE || tok.kind == ChunkerConstants.NEWLINE) {
      tok = tok.prev;
    }
    return tok.image;
  }

  @Override
  public void jjtSetLastToken(Token token) {
    super.jjtSetLastToken(token);
  }
}
/* JavaCC - OriginalChecksum=32eca416eb03f040ffafa6beff1b90cf (do not edit this line) */




© 2015 - 2024 Weber Informatics LLC | Privacy Policy