|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jruby.parser.ParserSupport
public class ParserSupport
Constructor Summary | |
---|---|
ParserSupport()
|
Method Summary | |
---|---|
Node |
addRootNode(Node topOfAST,
ISourcePosition position)
|
Node |
appendPrintToBlock(Node block)
|
Node |
appendToBlock(Node head,
Node tail)
|
Node |
appendWhileLoopToBlock(Node block,
boolean chop,
boolean split)
|
Node |
arg_add(ISourcePosition position,
Node node1,
Node node2)
|
Node |
arg_blk_pass(Node firstNode,
BlockPassNode secondNode)
|
Node |
arg_concat(ISourcePosition position,
Node node1,
Node node2)
|
Node |
aryset(Node receiver,
Node index)
Define an array set condition so we can return lhs |
AssignableNode |
assignable(Token lhs,
Node value)
|
Node |
attrset(Node receiver,
java.lang.String name)
Define an attribute set condition so we can return lhs |
void |
backrefAssignError(Node node)
|
void |
checkExpression(Node node)
Does this node represent an expression? |
void |
checkUselessStatement(Node node)
Check to see if current node is an useless statement. |
void |
checkUselessStatements(BlockNode blockNode)
Check all nodes but the last one in a BlockNode for useless (void context) statements. |
ISourcePosition |
createEmptyArgsNodePosition(ISourcePosition pos)
|
Node |
getConditionNode(Node node)
|
StaticScope |
getCurrentScope()
|
int |
getInSingle()
Getter for property inSingle. |
Node |
getMatchNode(Node firstNode,
Node secondNode)
|
Node |
getOperatorCallNode(Node firstNode,
java.lang.String operator)
|
Node |
getOperatorCallNode(Node firstNode,
java.lang.String operator,
Node secondNode)
|
Node |
getOperatorCallNode(Node firstNode,
java.lang.String operator,
Node secondNode,
ISourcePosition defaultPosition)
|
ArgumentNode |
getRestArgNode(Token token)
|
RubyParserResult |
getResult()
Gets the result. |
Node |
getReturnArgsNode(Node node)
|
Node |
gettable(java.lang.String id,
ISourcePosition position)
Create AST node representing variable type it represents. |
Node |
gettable2(java.lang.String id,
ISourcePosition position)
We know for callers of this that it cannot be any of the specials checked in gettable. |
void |
initTopLocalVariables()
Description of the RubyMethod |
boolean |
isBreakStatement(Node node)
Is the supplied node a break/control statement? |
boolean |
isInDef()
|
boolean |
isInSingle()
Getter for property inSingle. |
boolean |
isLiteral(Node node)
Is this a literal in the sense that MRI has a NODE_LIT for. |
Node |
literal_concat(ISourcePosition position,
Node head,
Node tail)
|
FloatNode |
negateFloat(FloatNode floatNode)
|
Node |
negateInteger(Node integerNode)
|
Node |
new_call(Node receiver,
Token name,
Node args,
Node iter)
|
Node |
new_fcall(Token operation,
Node args,
Node iter)
|
Node |
new_super(Node args,
Token operation)
|
Node |
new_yield(ISourcePosition position,
Node node)
|
AndNode |
newAndNode(Node left,
Node right)
|
Node |
newEvStrNode(ISourcePosition position,
Node node)
|
Node |
newline_node(Node node,
ISourcePosition position)
Wraps node with NEWLINE node. |
OrNode |
newOrNode(Node left,
Node right)
|
Node |
node_assign(Node lhs,
Node rhs)
|
void |
popCurrentScope()
|
void |
pushBlockScope()
|
void |
pushLocalScope()
|
void |
reset()
|
Node |
ret_args(Node node,
ISourcePosition position)
|
void |
setConfiguration(RubyParserConfiguration configuration)
Sets the configuration. |
void |
setInDef(boolean inDef)
|
void |
setInSingle(int inSingle)
Setter for property inSingle. |
void |
setResult(RubyParserResult result)
Sets the result. |
void |
setWarnings(IRubyWarnings warnings)
|
ISourcePosition |
union(ISourcePositionHolder first,
ISourcePositionHolder second)
|
ISourcePosition |
union(ISourcePosition first,
ISourcePosition second)
|
Node |
unwrapNewlineNode(Node node)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ParserSupport()
Method Detail |
---|
public void reset()
public StaticScope getCurrentScope()
public void popCurrentScope()
public void pushBlockScope()
public void pushLocalScope()
public Node arg_concat(ISourcePosition position, Node node1, Node node2)
public Node arg_blk_pass(Node firstNode, BlockPassNode secondNode)
public Node appendPrintToBlock(Node block)
public Node appendWhileLoopToBlock(Node block, boolean chop, boolean split)
public Node gettable2(java.lang.String id, ISourcePosition position)
id
- to check its variable typeposition
- location of this position
public Node gettable(java.lang.String id, ISourcePosition position)
id
- to check its variable typeposition
- location of this position
public AssignableNode assignable(Token lhs, Node value)
public Node newline_node(Node node, ISourcePosition position)
node
-
public ISourcePosition union(ISourcePositionHolder first, ISourcePositionHolder second)
public ISourcePosition union(ISourcePosition first, ISourcePosition second)
public Node addRootNode(Node topOfAST, ISourcePosition position)
public Node appendToBlock(Node head, Node tail)
public Node getOperatorCallNode(Node firstNode, java.lang.String operator)
public Node getOperatorCallNode(Node firstNode, java.lang.String operator, Node secondNode)
public Node getOperatorCallNode(Node firstNode, java.lang.String operator, Node secondNode, ISourcePosition defaultPosition)
public Node getMatchNode(Node firstNode, Node secondNode)
public Node aryset(Node receiver, Node index)
receiver
- array being setindex
- node which should evalute to index of array set
public Node attrset(Node receiver, java.lang.String name)
receiver
- object which contains attributename
- of the attribute being set
public void backrefAssignError(Node node)
public Node arg_add(ISourcePosition position, Node node1, Node node2)
public Node node_assign(Node lhs, Node rhs)
public Node ret_args(Node node, ISourcePosition position)
public boolean isBreakStatement(Node node)
node
- to be checked
public void checkExpression(Node node)
node
- to be checkedpublic boolean isLiteral(Node node)
node
- to be tested
public void checkUselessStatement(Node node)
node
- to be checked.public void checkUselessStatements(BlockNode blockNode)
blockNode
- to be checked.public Node getConditionNode(Node node)
public AndNode newAndNode(Node left, Node right)
public OrNode newOrNode(Node left, Node right)
public Node getReturnArgsNode(Node node)
public Node new_call(Node receiver, Token name, Node args, Node iter)
public Node new_fcall(Token operation, Node args, Node iter)
public Node new_super(Node args, Token operation)
public void initTopLocalVariables()
public boolean isInSingle()
public void setInSingle(int inSingle)
inSingle
- New value of property inSingle.public boolean isInDef()
public void setInDef(boolean inDef)
public int getInSingle()
public RubyParserResult getResult()
public void setResult(RubyParserResult result)
result
- The result to setpublic void setConfiguration(RubyParserConfiguration configuration)
configuration
- The configuration to setpublic void setWarnings(IRubyWarnings warnings)
public Node literal_concat(ISourcePosition position, Node head, Node tail)
public Node newEvStrNode(ISourcePosition position, Node node)
public Node new_yield(ISourcePosition position, Node node)
public Node negateInteger(Node integerNode)
public FloatNode negateFloat(FloatNode floatNode)
public ISourcePosition createEmptyArgsNodePosition(ISourcePosition pos)
public Node unwrapNewlineNode(Node node)
public ArgumentNode getRestArgNode(Token token)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |