|
|||||||||||
PREV NEXT | FRAMES NO FRAMES |
Packages that use CSTNode | |
org.codehaus.groovy.ast | Groovy AST nodes for the syntax of the language |
org.codehaus.groovy.control | |
org.codehaus.groovy.control.messages | |
org.codehaus.groovy.syntax | Lexer, parser and trees. |
org.codehaus.groovy.syntax.parser | The main parser of Groovy code into the Groovy AST model (Abstract Syntax Tree) |
Uses of CSTNode in org.codehaus.groovy.ast |
Methods in org.codehaus.groovy.ast with parameters of type CSTNode | |
void |
ASTNode.setCSTNode(CSTNode node)
|
Uses of CSTNode in org.codehaus.groovy.control |
Methods in org.codehaus.groovy.control with parameters of type CSTNode | |
void |
SourceUnit.addWarning(int importance,
String text,
CSTNode context)
Convenience wrapper for addWarning() that won't create an object unless it is relevant. |
void |
SourceUnit.addWarning(int importance,
String text,
Object data,
CSTNode context)
Convenience wrapper for addWarning() that won't create an object unless it is relevant. |
void |
SourceUnit.addError(String text,
CSTNode context)
Convenience wrapper for addError(). |
Uses of CSTNode in org.codehaus.groovy.control.messages |
Fields in org.codehaus.groovy.control.messages declared as CSTNode | |
protected CSTNode |
LocatedMessage.context
|
Constructors in org.codehaus.groovy.control.messages with parameters of type CSTNode | |
LocatedMessage(String message,
CSTNode context)
|
|
LocatedMessage(String message,
Object data,
CSTNode context)
|
|
WarningMessage(int importance,
String message,
CSTNode context)
Creates a new warning message. |
|
WarningMessage(int importance,
String message,
Object data,
CSTNode context)
Creates a new warning message. |
Uses of CSTNode in org.codehaus.groovy.syntax |
Subclasses of CSTNode in org.codehaus.groovy.syntax | |
class |
Reduction
A syntax reduction, produced by the Parser . |
class |
Token
A CSTNode produced by the Lexer . |
Methods in org.codehaus.groovy.syntax that return CSTNode | |
CSTNode |
CSTNode.setMeaning(int meaning)
Sets the meaning for this node (and it's root Token). |
abstract CSTNode |
CSTNode.get(int index)
Returns the specified element, or null. |
CSTNode |
CSTNode.get(int index,
boolean safe)
Returns the specified element, or Token.NULL if safe is set and the specified element is null (or doesn't exist). |
CSTNode |
CSTNode.add(CSTNode element)
Adds an element to the node. |
CSTNode |
CSTNode.set(int index,
CSTNode element)
Sets an element node in at the specified index. |
CSTNode |
Reduction.get(int index)
Returns the specified element, or null. |
CSTNode |
Reduction.add(CSTNode element)
Adds an element to the node. |
CSTNode |
Reduction.set(int index,
CSTNode element)
Sets an element in at the specified index. |
CSTNode |
Reduction.remove(int index)
Removes a node from the Reduction . |
CSTNode |
Token.setMeaning(int meaning)
Sets the meaning for this node (and it's root Token). |
CSTNode |
Token.get(int index)
Returns the specified element, or null. |
Methods in org.codehaus.groovy.syntax with parameters of type CSTNode | |
CSTNode |
CSTNode.add(CSTNode element)
Adds an element to the node. |
void |
CSTNode.addChildrenOf(CSTNode of)
Adds all children of the specified node to this one. |
CSTNode |
CSTNode.set(int index,
CSTNode element)
Sets an element node in at the specified index. |
CSTNode |
Reduction.add(CSTNode element)
Adds an element to the node. |
CSTNode |
Reduction.set(int index,
CSTNode element)
Sets an element in at the specified index. |
Reduction |
Token.asReduction(CSTNode second)
Creates a Reduction from this token, adding the supplied
node as the second element. |
Reduction |
Token.asReduction(CSTNode second,
CSTNode third)
Creates a Reduction from this token, adding the supplied
nodes as the second and third element, respectively. |
Reduction |
Token.asReduction(CSTNode second,
CSTNode third,
CSTNode fourth)
Creates a Reduction from this token, adding the supplied
nodes as the second, third, and fourth element, respectively. |
static void |
Types.makePrefix(CSTNode node,
boolean throwIfInvalid)
Converts a node from a generic type to a specific prefix type. |
static void |
Types.makePostfix(CSTNode node,
boolean throwIfInvalid)
Converts a node from a generic type to a specific postfix type. |
Uses of CSTNode in org.codehaus.groovy.syntax.parser |
Methods in org.codehaus.groovy.syntax.parser that return CSTNode | |
CSTNode |
Parser.dottedIdentifier()
Processes a dotted identifer. |
CSTNode |
Parser.topLevelStatement()
Processes a top level statement (classes, interfaces, unattached methods, and unattached code). |
CSTNode |
Parser.typeDeclaration()
A synomym for topLevelStatement() . |
protected CSTNode |
Parser.optionalDatatype(boolean significantNewlines,
boolean allowVoid)
Processes an optional data type marker (for a parameter, method return type, etc.). |
protected CSTNode |
Parser.datatype(boolean allowVoid)
Processes a datatype specification. |
protected CSTNode |
Parser.datatype()
A synonym for datatype( true ) . |
protected CSTNode |
Parser.scalarDatatype(boolean allowVoid)
Processes a scalar datatype specification. |
protected CSTNode |
Parser.statementBody(boolean requireBraces)
Processes the body of a complex statement (like "if", "for", etc.). |
protected CSTNode |
Parser.statement(boolean allowUnlabelledBlocks)
Processes a single statement. |
protected CSTNode |
Parser.statement()
Synonym for statement( false ) . |
protected CSTNode |
Parser.expression()
Processes a single (sub-)expression into a CSTNode. |
Methods in org.codehaus.groovy.syntax.parser with parameters of type CSTNode | |
ModuleNode |
ASTBuilder.build(CSTNode input)
Builds an AST ModuleNode from a Parser.module() Reduction. |
protected String |
ASTBuilder.packageDeclaration(CSTNode reduction)
Processes the Reduction produced by Parser.packageDeclaration(). |
protected void |
ASTBuilder.importStatements(ModuleNode module,
CSTNode container)
Processes the imports Reduction produced by Parser.module(). |
protected void |
ASTBuilder.importStatement(ModuleNode module,
CSTNode reduction)
Processes the Reduction produced by Parser.importStatement(). |
protected void |
ASTBuilder.topLevelStatement(ModuleNode module,
CSTNode reduction)
Processes the Reduction produced by Parser.topLevelStatement(). |
protected ClassNode |
ASTBuilder.classDeclaration(ClassNode context,
CSTNode reduction)
Processes the Reduction produced by Parser.classDeclaration(). |
protected void |
ASTBuilder.typeBody(ClassNode classNode,
CSTNode body,
int propertyModifiers,
int methodModifiers)
Processes a type body for classDeclaration() and others. |
protected void |
ASTBuilder.addPropertyDeclaration(ClassNode classNode,
CSTNode reduction,
int extraModifiers)
Processes the Reduction produced by Parser.propertyDeclaration(). |
protected void |
ASTBuilder.addPropertyDeclaration(ClassNode classNode,
CSTNode reduction)
A synonym for addPropertyDeclaration( classNode, reduction, 0 ) . |
protected MethodNode |
ASTBuilder.methodDeclaration(ClassNode classNode,
CSTNode reduction,
int extraModifiers)
Processes the Reduction produced by Parser.methodDeclaration(). |
protected MethodNode |
ASTBuilder.methodDeclaration(ClassNode classNode,
CSTNode reduction)
A synonym for methodDeclaration( classNode, reduction, 0 ) . |
protected Parameter[] |
ASTBuilder.parameterDeclarations(CSTNode reduction)
Processes the Reduction produced by Parser.parameterDeclarationList(). |
protected ClassNode |
ASTBuilder.interfaceDeclaration(ClassNode context,
CSTNode reduction)
Processes the Reduction produced by Parser.interfaceDeclaration(). |
protected BlockStatement |
ASTBuilder.statementBody(CSTNode reduction)
Processes the Reduction that results from Parser.statementBody(). |
protected BlockStatement |
ASTBuilder.statements(CSTNode reduction,
int first)
Processes any series of statements, starting at the specified offset and running to the end of the CSTNode. |
protected BlockStatement |
ASTBuilder.statementBlock(CSTNode reduction)
Processes any statement block. |
protected Statement |
ASTBuilder.statement(CSTNode reduction)
Processes the Reduction produced by Parser.statement(). |
protected AssertStatement |
ASTBuilder.assertStatement(CSTNode reduction)
Processes the Reduction produced by Parser.assertStatement(). |
protected BreakStatement |
ASTBuilder.breakStatement(CSTNode reduction)
Processes the Reduction produced by Parser.breakStatement(). |
protected ContinueStatement |
ASTBuilder.continueStatement(CSTNode reduction)
Processes the Reduction produced by Parser.continueStatement(). |
protected IfStatement |
ASTBuilder.ifStatement(CSTNode reduction)
Processes the Reduction produced by Parser.ifStatement(). |
protected ReturnStatement |
ASTBuilder.returnStatement(CSTNode reduction)
Processes the Reduction produced by Parser.returnStatement(). |
protected SwitchStatement |
ASTBuilder.switchStatement(CSTNode reduction)
Processes the Reduction produced by Parser.switchStatement(). |
protected CaseStatement |
ASTBuilder.caseStatement(CSTNode reduction)
Processes the Reduction produced by Parser.switchStatement() for cases. |
protected SynchronizedStatement |
ASTBuilder.synchronizedStatement(CSTNode reduction)
Processes the Reduction produced by Parser.synchronizedStatement(). |
protected ThrowStatement |
ASTBuilder.throwStatement(CSTNode reduction)
Processes the Reduction produced by Parser.throwStatement(). |
protected TryCatchStatement |
ASTBuilder.tryStatement(CSTNode reduction)
Processes the Reduction produced by Parser.tryStatement(). |
protected ForStatement |
ASTBuilder.forStatement(CSTNode reduction)
Processes the Reduction produced by Parser.forStatement(). |
protected DoWhileStatement |
ASTBuilder.doWhileStatement(CSTNode reduction)
Processes the Reduction produced by Parser.doWhileStatement(). |
protected WhileStatement |
ASTBuilder.whileStatement(CSTNode reduction)
Processes the Reduction produced by Parser.whileStatement(). |
protected Statement |
ASTBuilder.expressionStatement(CSTNode node)
Processes any expression that forms a complete statement. |
protected Expression[] |
ASTBuilder.expressions(CSTNode reduction)
Processes a series of expression to an Expression[]. |
protected Expression |
ASTBuilder.expression(CSTNode reduction)
Processes the CSTNode produced by Parser.expression(). |
Expression |
ASTBuilder.infixExpression(CSTNode reduction)
Processes most infix operators. |
Expression |
ASTBuilder.prefixExpression(CSTNode reduction)
Processes most prefix operators. |
Expression |
ASTBuilder.simpleExpression(CSTNode reduction)
Processes most simple expressions. |
Expression |
ASTBuilder.numericExpression(CSTNode reduction,
boolean negate)
Processes numeric literals. |
Expression |
ASTBuilder.syntheticExpression(CSTNode reduction)
Processes most synthetic expressions. |
protected Expression |
ASTBuilder.variableOrClassExpression(CSTNode reduction)
Converts a (typically IDENTIFIER) CSTNode to a ClassExpression, if valid, or a VariableExpression otherwise. |
protected ClassExpression |
ASTBuilder.classExpression(CSTNode reduction)
Converts a CSTNode into a ClassExpression. |
protected VariableExpression |
ASTBuilder.variableExpression(CSTNode reduction)
Converts a (typically IDENTIFIER) CSTNode to a VariableExpression, if valid. |
protected Type |
ASTBuilder.typeExpression(CSTNode reduction)
Converts an (possibly optional) type expression to a Type. |
protected Expression |
ASTBuilder.variableDeclarationExpression(CSTNode reduction)
Processes the Reduction produced by parsing a typed variable declaration. |
protected MethodCallExpression |
ASTBuilder.methodCallExpression(CSTNode reduction)
Processes a SYNTH_METHOD_CALL Reduction produced by Parser.expression(). |
protected ClosureExpression |
ASTBuilder.closureExpression(CSTNode reduction)
Processes the Reduction produced by Parser.closureExpression(). |
protected Expression |
ASTBuilder.parameterList(CSTNode reduction)
Processes the Reduction produced by Parser.parameterList(). |
protected Expression |
ASTBuilder.newExpression(CSTNode reduction)
Processes the Reduction produced by Parser.newExpression(). |
protected TupleExpression |
ASTBuilder.tupleExpression(CSTNode reduction)
Processes the Reduction produced by Parser.newArrayInitializer(). |
protected Expression |
ASTBuilder.gstringExpression(CSTNode reduction)
Processes the Reduction produced by Parser.gstring(). |
protected ListExpression |
ASTBuilder.listExpression(CSTNode reduction)
Processes one of the Reductions produced by Parser.listOrMapExpression(). |
protected MapExpression |
ASTBuilder.mapExpression(CSTNode reduction)
Processes the other Reduction produced by Parser.listOrMapExpression(). |
protected String |
ASTBuilder.makeName(CSTNode root,
String defaultName)
Converts a CSTNode representation of a type name back into a string. |
protected String |
ASTBuilder.makeName(CSTNode root)
A synonym for makeName( root, "java.lang.Object" ) . |
protected String |
ASTBuilder.identifier(CSTNode identifier)
Returns the text of an identifier. |
protected String |
ASTBuilder.resolveName(CSTNode root,
boolean safe)
Builds a name from a CSTNode, then resolves it. |
protected String |
ASTBuilder.resolveName(CSTNode root)
A synonym for resolveName( root, true ) . |
protected int |
ASTBuilder.modifiers(CSTNode list)
Returns the ASM Constant bits for the specified modifiers. |
protected void |
ASTBuilder.error(String description,
CSTNode node)
Throws a ParserException . |
static boolean |
ExpressionSupport.isAnExpression(CSTNode node,
boolean unknownReturns)
Returns true if the node is a complete expression (something that has a value). |
static boolean |
ExpressionSupport.isAnExpression(CSTNode node)
A synonym for isAnExpression( node, false ) . |
static boolean |
ExpressionSupport.isAnOperator(CSTNode node,
boolean unknownReturns)
Returns true if the node is an operator and not an expression (see above). |
static boolean |
ExpressionSupport.isAnOperator(CSTNode node)
A synonym for isAnOperator(node, false) . |
static boolean |
ExpressionSupport.isAVariable(CSTNode node)
Returns true if the node might be a variable. |
static boolean |
ExpressionSupport.isInvokable(CSTNode node)
Returns true if the node might be a method. |
static boolean |
ExpressionSupport.isAModifiableExpression(CSTNode node,
boolean unknownReturns)
Returns true if the node is a modifiable expression (ie. |
static boolean |
ExpressionSupport.isAModifiableExpression(CSTNode node)
A synonym for isAModifiableExpression( node, false ) . |
static boolean |
ExpressionSupport.isPotentialCastOperator(CSTNode node)
Returns true if the node is potentially a cast operator. |
static boolean |
ExpressionSupport.isAPotentialTypeName(CSTNode node,
boolean allowVoid)
Returns true if the node is potentially a type name. |
Reduction |
Parser.propertyDeclaration(Reduction modifiers,
CSTNode type,
Token identifier)
Processes a class/interface property, including the optional initialization clause. |
Reduction |
Parser.methodDeclaration(Reduction modifiers,
CSTNode type,
Token identifier,
boolean emptyOnly)
Processes a class/interface method. |
protected Reduction |
Parser.variableDeclarationExpression(CSTNode datatype)
Processes a typed variable declaration. |
|
|||||||||||
PREV NEXT | FRAMES NO FRAMES |