org.jrubyparser.lexer
Class StringTerm
java.lang.Object
org.jrubyparser.lexer.StrTerm
org.jrubyparser.lexer.StringTerm
public class StringTerm
- extends StrTerm
|
Constructor Summary |
StringTerm(int flags,
int begin,
int end)
|
StringTerm
public StringTerm(int flags,
int begin,
int end)
parseString
public int parseString(Lexer lexer,
LexerSource src)
throws IOException
- Specified by:
parseString in class StrTerm
- Throws:
IOException
parseSimpleStringIntoBuffer
public int parseSimpleStringIntoBuffer(LexerSource src,
CStringBuilder buffer)
throws IOException
- Throws:
IOException
parseStringIntoBuffer
public int parseStringIntoBuffer(Lexer lexer,
LexerSource src,
CStringBuilder buffer)
throws IOException
- Throws:
IOException
parseDExprIntoBuffer
public int parseDExprIntoBuffer(Lexer lexer,
LexerSource src,
CStringBuilder buffer)
throws IOException
- Throws:
IOException
isSubstituting
public boolean isSubstituting()
- Description copied from class:
StrTerm
- Report whether this string should be substituting things like \n into newlines (double
quoting rules).
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()
- Description copied from class:
StrTerm
- Record any mutable state from this StrTerm such that it can
be set back to this exact state through a call to
StrTerm.setMutableState(java.lang.Object)
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)
- Description copied from class:
StrTerm
- Support for incremental lexing: set current state of the term. See
StrTerm.getMutableState()
- 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
toString
public String toString()
- Overrides:
toString in class Object
hashCode
public int hashCode()
- Overrides:
hashCode in class Object
Copyright © 2013. All Rights Reserved.