org.jrubyparser.lexer
Class HeredocTerm
java.lang.Object
org.jrubyparser.lexer.StrTerm
org.jrubyparser.lexer.HeredocTerm
public class HeredocTerm
- extends StrTerm
A lexing unit for scanning a heredoc element.
Example:
foo(<
HeredocTerm
public HeredocTerm(String marker,
int func,
String lastLine)
parseString
public int parseString(Lexer lexer,
LexerSource src)
throws IOException
- Specified by:
parseString in class StrTerm
- Throws:
IOException
isSubstituting
public boolean isSubstituting()
- Report whether this string should be substituting things like \n into newlines.
E.g. are we dealing with a "" string or a '' string (or their alternate representations)
- Specified by:
isSubstituting in class StrTerm
getMutableState
public Object getMutableState()
- Record any mutable state from this StrTerm such that it can
be set back to this exact state through a call to
setMutableState
later on. Necessary for incremental lexing where we may restart
lexing parts of a string (since they can be split up due to
Ruby embedding like "Evaluated by Ruby: #{foo}".
- Specified by:
getMutableState in class StrTerm
setMutableState
public void setMutableState(Object o)
- Apply the given state object (earlier returned by
getMutableState)
to this StringTerm to revert state to the earlier snapshot.
- Specified by:
setMutableState in class StrTerm
splitEmbeddedTokens
public void splitEmbeddedTokens()
- Description copied from class:
StrTerm
- Tell this string term to return separate tokens for embedded ruby code (#$foo, #@foo, #{foo})
- Specified by:
splitEmbeddedTokens in class StrTerm
equals
public boolean equals(Object obj)
- Overrides:
equals in class Object
hashCode
public int hashCode()
- Overrides:
hashCode in class Object
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2013. All Rights Reserved.