getPosition(ISourcePosition startPosition, boolean inclusive) Get position information for Token/Node that follows node represented by startPosition
and current lexer location.
setParserSupport(ParserSupport parserSupport) Parse must pass its support object for some check at bottom of
yylex().
public void
setPreserveSpaces(boolean preserveSpaces) Set whether or not the lexer should be "space preserving" - in other words, whether
the parser should consider whitespace sequences and code comments to be separate
tokens to return to the client.
public ISourcePosition getPosition(ISourcePosition startPosition, boolean inclusive)(Code)
Get position information for Token/Node that follows node represented by startPosition
and current lexer location.
Parameters: startPosition - previous node/token Parameters: inclusive - include previous node into position information of current node a new position
Return whether or not the lexer should be "space preserving". For a description
of what this means, see
RubyYaccLexer.setPreserveSpaces .
preserveSpaces True iff space and comment sequences will be returned astokens, and false otherwise. See Also:RubyYaccLexer.setPreserveSpaces
Read a comment up to end of line. When found each comment will get stored away into
the parser result so that any interested party can use them as they seem fit. One idea
is that IDE authors can do distance based heuristics to associate these comments to the
AST node they think they belong to.
Parameters: c - last character read from lexer source newline or eof value
public void setParserSupport(ParserSupport parserSupport)(Code)
Parse must pass its support object for some check at bottom of
yylex(). Ruby does it this way as well (i.e. a little parsing
logic in the lexer).
Parameters: parserSupport -
setPreserveSpaces
public void setPreserveSpaces(boolean preserveSpaces)(Code)
Set whether or not the lexer should be "space preserving" - in other words, whether
the parser should consider whitespace sequences and code comments to be separate
tokens to return to the client. Parsers typically do not want to see any
whitespace or comment tokens - but an IDE trying to tokenize a chunk of source code
does want to identify these separately. The default, false, means the parser mode.
Parameters: preserveSpaces - If true, return space and comment sequences as tokens, if false, skip these See Also:RubyYaccLexer.getPreserveSpaces