public class ArgsNode extends Node
Modifier and Type | Field and Description |
---|---|
protected Arity |
arity |
protected boolean |
hasKwargs |
protected boolean |
hasMasgnArgs |
protected boolean |
hasOptArgs |
protected boolean |
isSimple |
protected int |
maxArgsCount |
protected int |
restArg |
protected ArgumentNode |
restArgNode |
Constructor and Description |
---|
ArgsNode(ISourcePosition position,
ListNode pre,
ListNode optionalArguments,
RestArgNode rest,
ListNode post,
BlockArgNode blockArgNode)
Construct a new ArgsNode with no keyword arguments.
|
ArgsNode(ISourcePosition position,
ListNode pre,
ListNode optionalArguments,
RestArgNode rest,
ListNode post,
ListNode keywords,
KeywordRestArgNode keyRest,
BlockArgNode blockArgNode)
Construct a new ArgsNode with keyword arguments.
|
Modifier and Type | Method and Description |
---|---|
<T> T |
accept(NodeVisitor<T> iVisitor)
Accept for the visitor pattern.
|
protected Arity |
calculateArity() |
void |
checkArgCount(Ruby runtime,
int argsLength) |
void |
checkArgCount(Ruby runtime,
String name,
int argsLength) |
List<Node> |
childNodes() |
Arity |
getArity() |
BlockArgNode |
getBlock()
Gets the explicit block argument of the parameter list (&block).
|
KeywordRestArgNode |
getKeyRest() |
ListNode |
getKeywords() |
int |
getMaxArgumentsCount() |
NodeType |
getNodeType() |
ListNode |
getOptArgs()
Gets the optArgs.
|
int |
getOptionalArgsCount() |
ListNode |
getPost() |
int |
getPostCount() |
int |
getPostIndex() |
ListNode |
getPre()
Gets the required arguments at the beginning of the argument definition
|
int |
getPreCount() |
int |
getRequiredArgsCount() |
int |
getRestArg()
Gets the restArg.
|
ArgumentNode |
getRestArgNode()
Gets the restArgNode.
|
boolean |
hasKwargs() |
protected boolean |
hasMasgnArgs() |
createList, createList, createList, createList, findFirstChild, getNodeName, getPosition, isNil, needsDefinitionCheck, setPosition, toString, toString
protected final ArgumentNode restArgNode
protected final int restArg
protected Arity arity
protected final boolean hasOptArgs
protected final boolean hasMasgnArgs
protected final boolean hasKwargs
protected int maxArgsCount
protected final boolean isSimple
public ArgsNode(ISourcePosition position, ListNode pre, ListNode optionalArguments, RestArgNode rest, ListNode post, BlockArgNode blockArgNode)
position
- pre
- optionalArguments
- rest
- post
- blockArgNode
- public ArgsNode(ISourcePosition position, ListNode pre, ListNode optionalArguments, RestArgNode rest, ListNode post, ListNode keywords, KeywordRestArgNode keyRest, BlockArgNode blockArgNode)
position
- pre
- optionalArguments
- rest
- post
- keywords
- keyRest
- blockArgNode
- public NodeType getNodeType()
getNodeType
in class Node
protected Arity calculateArity()
public boolean hasKwargs()
protected boolean hasMasgnArgs()
public <T> T accept(NodeVisitor<T> iVisitor)
public ListNode getPre()
public Arity getArity()
public int getRequiredArgsCount()
public int getOptionalArgsCount()
public ListNode getPost()
public int getMaxArgumentsCount()
public ListNode getOptArgs()
public int getRestArg()
public ArgumentNode getRestArgNode()
public BlockArgNode getBlock()
public int getPostCount()
public int getPostIndex()
public int getPreCount()
public ListNode getKeywords()
public KeywordRestArgNode getKeyRest()
public void checkArgCount(Ruby runtime, int argsLength)
public List<Node> childNodes()
childNodes
in class Node
Copyright © 2001-2015 JRuby. All Rights Reserved.