public ISourcePosition getPosition(ISourcePosition startPosition) { if (startPosition != null) { lastPosition = startPosition; return lastPosition; } return getPosition(); }
/** * Create our food-source for the lexer * * @param sourceName is the file we are reading * @param reader is what represents the contents of file sourceName * @param line starting line number for source (used by eval) * @param extraPositionInformation will gives us extra information that an IDE may want (deprecated) */ protected LexerSource(String sourceName, List<String> list, int lineOffset, boolean extraPositionInformation) { this.sourceName = sourceName; this.lineOffset = lineOffset; positionFactory = new SimplePositionFactory(this, line); this.list = list; lineBuffer = new StringBuilder(160); sourceLine = new StringBuilder(160); }
/** * Create our food-source for the lexer * * @param sourceName is the file we are reading * @param reader is what represents the contents of file sourceName * @param line starting line number for source (used by eval) * @param extraPositionInformation will gives us extra information that an IDE may want (deprecated) */ protected LexerSource(String sourceName, List<String> list, int lineOffset, boolean extraPositionInformation) { this.sourceName = sourceName; this.lineOffset = lineOffset; positionFactory = new SimplePositionFactory(this, line); this.list = list; lineBuffer = new StringBuilder(160); sourceLine = new StringBuilder(160); }
public ISourcePosition getPosition(ISourcePosition startPosition) { if (startPosition != null) { lastPosition = startPosition; return lastPosition; } return getPosition(); }
/** * Where is the reader within the source {filename,row} * * @return the current position */ public ISourcePosition getPosition() { return positionFactory.getPosition(null); }
/** * Where is the reader within the source {filename,row} * * @return the current position */ public ISourcePosition getPosition(ISourcePosition startPosition) { return positionFactory.getPosition(startPosition); }
/** * Where is the reader within the source {filename,row} * * @return the current position */ public ISourcePosition getPosition() { return positionFactory.getPosition(null); }
/** * Where is the reader within the source {filename,row} * * @return the current position */ public ISourcePosition getPosition(ISourcePosition startPosition) { return positionFactory.getPosition(startPosition); }