Documentation
¶
Index ¶
- Constants
- type AliasGlobalVariableNode
- func (n *AliasGlobalVariableNode) Accept(visitor Visitor)
- func (n *AliasGlobalVariableNode) ChildNodes() []Node
- func (n *AliasGlobalVariableNode) CompactChildNodes() []Node
- func (n *AliasGlobalVariableNode) GetLocation() Location
- func (n *AliasGlobalVariableNode) GetNodeID() int
- func (n *AliasGlobalVariableNode) ToJSON() map[string]interface{}
- type AliasMethodNode
- type AlternationPatternNode
- func (n *AlternationPatternNode) Accept(visitor Visitor)
- func (n *AlternationPatternNode) ChildNodes() []Node
- func (n *AlternationPatternNode) CompactChildNodes() []Node
- func (n *AlternationPatternNode) GetLocation() Location
- func (n *AlternationPatternNode) GetNodeID() int
- func (n *AlternationPatternNode) ToJSON() map[string]interface{}
- type AndNode
- type ArgumentsNode
- func (n *ArgumentsNode) Accept(visitor Visitor)
- func (n *ArgumentsNode) ChildNodes() []Node
- func (n *ArgumentsNode) CompactChildNodes() []Node
- func (n *ArgumentsNode) GetLocation() Location
- func (n *ArgumentsNode) GetNodeID() int
- func (n *ArgumentsNode) IsCONTAINS_FORWARDING() bool
- func (n *ArgumentsNode) IsCONTAINS_KEYWORDS() bool
- func (n *ArgumentsNode) IsCONTAINS_KEYWORD_SPLAT() bool
- func (n *ArgumentsNode) IsCONTAINS_MULTIPLE_SPLATS() bool
- func (n *ArgumentsNode) IsCONTAINS_SPLAT() bool
- func (n *ArgumentsNode) ToJSON() map[string]interface{}
- type ArrayNode
- func (n *ArrayNode) Accept(visitor Visitor)
- func (n *ArrayNode) ChildNodes() []Node
- func (n *ArrayNode) CompactChildNodes() []Node
- func (n *ArrayNode) GetLocation() Location
- func (n *ArrayNode) GetNodeID() int
- func (n *ArrayNode) IsCONTAINS_SPLAT() bool
- func (n *ArrayNode) ToJSON() map[string]interface{}
- type ArrayPatternNode
- func (n *ArrayPatternNode) Accept(visitor Visitor)
- func (n *ArrayPatternNode) ChildNodes() []Node
- func (n *ArrayPatternNode) CompactChildNodes() []Node
- func (n *ArrayPatternNode) GetLocation() Location
- func (n *ArrayPatternNode) GetNodeID() int
- func (n *ArrayPatternNode) ToJSON() map[string]interface{}
- type AssocNode
- type AssocSplatNode
- type BackReferenceReadNode
- func (n *BackReferenceReadNode) Accept(visitor Visitor)
- func (n *BackReferenceReadNode) ChildNodes() []Node
- func (n *BackReferenceReadNode) CompactChildNodes() []Node
- func (n *BackReferenceReadNode) GetLocation() Location
- func (n *BackReferenceReadNode) GetNodeID() int
- func (n *BackReferenceReadNode) ToJSON() map[string]interface{}
- type BasicVisitor
- type BeginNode
- type BlockArgumentNode
- func (n *BlockArgumentNode) Accept(visitor Visitor)
- func (n *BlockArgumentNode) ChildNodes() []Node
- func (n *BlockArgumentNode) CompactChildNodes() []Node
- func (n *BlockArgumentNode) GetLocation() Location
- func (n *BlockArgumentNode) GetNodeID() int
- func (n *BlockArgumentNode) ToJSON() map[string]interface{}
- type BlockLocalVariableNode
- func (n *BlockLocalVariableNode) Accept(visitor Visitor)
- func (n *BlockLocalVariableNode) ChildNodes() []Node
- func (n *BlockLocalVariableNode) CompactChildNodes() []Node
- func (n *BlockLocalVariableNode) GetLocation() Location
- func (n *BlockLocalVariableNode) GetNodeID() int
- func (n *BlockLocalVariableNode) IsREPEATED_PARAMETER() bool
- func (n *BlockLocalVariableNode) ToJSON() map[string]interface{}
- type BlockNode
- type BlockParameterNode
- func (n *BlockParameterNode) Accept(visitor Visitor)
- func (n *BlockParameterNode) ChildNodes() []Node
- func (n *BlockParameterNode) CompactChildNodes() []Node
- func (n *BlockParameterNode) GetLocation() Location
- func (n *BlockParameterNode) GetNodeID() int
- func (n *BlockParameterNode) IsREPEATED_PARAMETER() bool
- func (n *BlockParameterNode) ToJSON() map[string]interface{}
- type BlockParametersNode
- func (n *BlockParametersNode) Accept(visitor Visitor)
- func (n *BlockParametersNode) ChildNodes() []Node
- func (n *BlockParametersNode) CompactChildNodes() []Node
- func (n *BlockParametersNode) GetLocation() Location
- func (n *BlockParametersNode) GetNodeID() int
- func (n *BlockParametersNode) ToJSON() map[string]interface{}
- type BreakNode
- type CallAndWriteNode
- func (n *CallAndWriteNode) Accept(visitor Visitor)
- func (n *CallAndWriteNode) ChildNodes() []Node
- func (n *CallAndWriteNode) CompactChildNodes() []Node
- func (n *CallAndWriteNode) GetLocation() Location
- func (n *CallAndWriteNode) GetNodeID() int
- func (n *CallAndWriteNode) IsATTRIBUTE_WRITE() bool
- func (n *CallAndWriteNode) IsIGNORE_VISIBILITY() bool
- func (n *CallAndWriteNode) IsSAFE_NAVIGATION() bool
- func (n *CallAndWriteNode) IsVARIABLE_CALL() bool
- func (n *CallAndWriteNode) ToJSON() map[string]interface{}
- type CallNode
- func (n *CallNode) Accept(visitor Visitor)
- func (n *CallNode) ChildNodes() []Node
- func (n *CallNode) CompactChildNodes() []Node
- func (n *CallNode) GetLocation() Location
- func (n *CallNode) GetNodeID() int
- func (n *CallNode) IsATTRIBUTE_WRITE() bool
- func (n *CallNode) IsIGNORE_VISIBILITY() bool
- func (n *CallNode) IsSAFE_NAVIGATION() bool
- func (n *CallNode) IsVARIABLE_CALL() bool
- func (n *CallNode) ToJSON() map[string]interface{}
- type CallOperatorWriteNode
- func (n *CallOperatorWriteNode) Accept(visitor Visitor)
- func (n *CallOperatorWriteNode) ChildNodes() []Node
- func (n *CallOperatorWriteNode) CompactChildNodes() []Node
- func (n *CallOperatorWriteNode) GetLocation() Location
- func (n *CallOperatorWriteNode) GetNodeID() int
- func (n *CallOperatorWriteNode) IsATTRIBUTE_WRITE() bool
- func (n *CallOperatorWriteNode) IsIGNORE_VISIBILITY() bool
- func (n *CallOperatorWriteNode) IsSAFE_NAVIGATION() bool
- func (n *CallOperatorWriteNode) IsVARIABLE_CALL() bool
- func (n *CallOperatorWriteNode) ToJSON() map[string]interface{}
- type CallOrWriteNode
- func (n *CallOrWriteNode) Accept(visitor Visitor)
- func (n *CallOrWriteNode) ChildNodes() []Node
- func (n *CallOrWriteNode) CompactChildNodes() []Node
- func (n *CallOrWriteNode) GetLocation() Location
- func (n *CallOrWriteNode) GetNodeID() int
- func (n *CallOrWriteNode) IsATTRIBUTE_WRITE() bool
- func (n *CallOrWriteNode) IsIGNORE_VISIBILITY() bool
- func (n *CallOrWriteNode) IsSAFE_NAVIGATION() bool
- func (n *CallOrWriteNode) IsVARIABLE_CALL() bool
- func (n *CallOrWriteNode) ToJSON() map[string]interface{}
- type CallTargetNode
- func (n *CallTargetNode) Accept(visitor Visitor)
- func (n *CallTargetNode) ChildNodes() []Node
- func (n *CallTargetNode) CompactChildNodes() []Node
- func (n *CallTargetNode) GetLocation() Location
- func (n *CallTargetNode) GetNodeID() int
- func (n *CallTargetNode) IsATTRIBUTE_WRITE() bool
- func (n *CallTargetNode) IsIGNORE_VISIBILITY() bool
- func (n *CallTargetNode) IsSAFE_NAVIGATION() bool
- func (n *CallTargetNode) IsVARIABLE_CALL() bool
- func (n *CallTargetNode) ToJSON() map[string]interface{}
- type CapturePatternNode
- func (n *CapturePatternNode) Accept(visitor Visitor)
- func (n *CapturePatternNode) ChildNodes() []Node
- func (n *CapturePatternNode) CompactChildNodes() []Node
- func (n *CapturePatternNode) GetLocation() Location
- func (n *CapturePatternNode) GetNodeID() int
- func (n *CapturePatternNode) ToJSON() map[string]interface{}
- type CaseMatchNode
- type CaseNode
- type ClassNode
- type ClassVariableAndWriteNode
- func (n *ClassVariableAndWriteNode) Accept(visitor Visitor)
- func (n *ClassVariableAndWriteNode) ChildNodes() []Node
- func (n *ClassVariableAndWriteNode) CompactChildNodes() []Node
- func (n *ClassVariableAndWriteNode) GetLocation() Location
- func (n *ClassVariableAndWriteNode) GetNodeID() int
- func (n *ClassVariableAndWriteNode) ToJSON() map[string]interface{}
- type ClassVariableOperatorWriteNode
- func (n *ClassVariableOperatorWriteNode) Accept(visitor Visitor)
- func (n *ClassVariableOperatorWriteNode) ChildNodes() []Node
- func (n *ClassVariableOperatorWriteNode) CompactChildNodes() []Node
- func (n *ClassVariableOperatorWriteNode) GetLocation() Location
- func (n *ClassVariableOperatorWriteNode) GetNodeID() int
- func (n *ClassVariableOperatorWriteNode) ToJSON() map[string]interface{}
- type ClassVariableOrWriteNode
- func (n *ClassVariableOrWriteNode) Accept(visitor Visitor)
- func (n *ClassVariableOrWriteNode) ChildNodes() []Node
- func (n *ClassVariableOrWriteNode) CompactChildNodes() []Node
- func (n *ClassVariableOrWriteNode) GetLocation() Location
- func (n *ClassVariableOrWriteNode) GetNodeID() int
- func (n *ClassVariableOrWriteNode) ToJSON() map[string]interface{}
- type ClassVariableReadNode
- func (n *ClassVariableReadNode) Accept(visitor Visitor)
- func (n *ClassVariableReadNode) ChildNodes() []Node
- func (n *ClassVariableReadNode) CompactChildNodes() []Node
- func (n *ClassVariableReadNode) GetLocation() Location
- func (n *ClassVariableReadNode) GetNodeID() int
- func (n *ClassVariableReadNode) ToJSON() map[string]interface{}
- type ClassVariableTargetNode
- func (n *ClassVariableTargetNode) Accept(visitor Visitor)
- func (n *ClassVariableTargetNode) ChildNodes() []Node
- func (n *ClassVariableTargetNode) CompactChildNodes() []Node
- func (n *ClassVariableTargetNode) GetLocation() Location
- func (n *ClassVariableTargetNode) GetNodeID() int
- func (n *ClassVariableTargetNode) ToJSON() map[string]interface{}
- type ClassVariableWriteNode
- func (n *ClassVariableWriteNode) Accept(visitor Visitor)
- func (n *ClassVariableWriteNode) ChildNodes() []Node
- func (n *ClassVariableWriteNode) CompactChildNodes() []Node
- func (n *ClassVariableWriteNode) GetLocation() Location
- func (n *ClassVariableWriteNode) GetNodeID() int
- func (n *ClassVariableWriteNode) ToJSON() map[string]interface{}
- type CommandLine
- type Comment
- type ConstantAndWriteNode
- func (n *ConstantAndWriteNode) Accept(visitor Visitor)
- func (n *ConstantAndWriteNode) ChildNodes() []Node
- func (n *ConstantAndWriteNode) CompactChildNodes() []Node
- func (n *ConstantAndWriteNode) GetLocation() Location
- func (n *ConstantAndWriteNode) GetNodeID() int
- func (n *ConstantAndWriteNode) ToJSON() map[string]interface{}
- type ConstantOperatorWriteNode
- func (n *ConstantOperatorWriteNode) Accept(visitor Visitor)
- func (n *ConstantOperatorWriteNode) ChildNodes() []Node
- func (n *ConstantOperatorWriteNode) CompactChildNodes() []Node
- func (n *ConstantOperatorWriteNode) GetLocation() Location
- func (n *ConstantOperatorWriteNode) GetNodeID() int
- func (n *ConstantOperatorWriteNode) ToJSON() map[string]interface{}
- type ConstantOrWriteNode
- func (n *ConstantOrWriteNode) Accept(visitor Visitor)
- func (n *ConstantOrWriteNode) ChildNodes() []Node
- func (n *ConstantOrWriteNode) CompactChildNodes() []Node
- func (n *ConstantOrWriteNode) GetLocation() Location
- func (n *ConstantOrWriteNode) GetNodeID() int
- func (n *ConstantOrWriteNode) ToJSON() map[string]interface{}
- type ConstantPathAndWriteNode
- func (n *ConstantPathAndWriteNode) Accept(visitor Visitor)
- func (n *ConstantPathAndWriteNode) ChildNodes() []Node
- func (n *ConstantPathAndWriteNode) CompactChildNodes() []Node
- func (n *ConstantPathAndWriteNode) GetLocation() Location
- func (n *ConstantPathAndWriteNode) GetNodeID() int
- func (n *ConstantPathAndWriteNode) ToJSON() map[string]interface{}
- type ConstantPathNode
- func (n *ConstantPathNode) Accept(visitor Visitor)
- func (n *ConstantPathNode) ChildNodes() []Node
- func (n *ConstantPathNode) CompactChildNodes() []Node
- func (n *ConstantPathNode) GetLocation() Location
- func (n *ConstantPathNode) GetNodeID() int
- func (n *ConstantPathNode) ToJSON() map[string]interface{}
- type ConstantPathOperatorWriteNode
- func (n *ConstantPathOperatorWriteNode) Accept(visitor Visitor)
- func (n *ConstantPathOperatorWriteNode) ChildNodes() []Node
- func (n *ConstantPathOperatorWriteNode) CompactChildNodes() []Node
- func (n *ConstantPathOperatorWriteNode) GetLocation() Location
- func (n *ConstantPathOperatorWriteNode) GetNodeID() int
- func (n *ConstantPathOperatorWriteNode) ToJSON() map[string]interface{}
- type ConstantPathOrWriteNode
- func (n *ConstantPathOrWriteNode) Accept(visitor Visitor)
- func (n *ConstantPathOrWriteNode) ChildNodes() []Node
- func (n *ConstantPathOrWriteNode) CompactChildNodes() []Node
- func (n *ConstantPathOrWriteNode) GetLocation() Location
- func (n *ConstantPathOrWriteNode) GetNodeID() int
- func (n *ConstantPathOrWriteNode) ToJSON() map[string]interface{}
- type ConstantPathTargetNode
- func (n *ConstantPathTargetNode) Accept(visitor Visitor)
- func (n *ConstantPathTargetNode) ChildNodes() []Node
- func (n *ConstantPathTargetNode) CompactChildNodes() []Node
- func (n *ConstantPathTargetNode) GetLocation() Location
- func (n *ConstantPathTargetNode) GetNodeID() int
- func (n *ConstantPathTargetNode) ToJSON() map[string]interface{}
- type ConstantPathWriteNode
- func (n *ConstantPathWriteNode) Accept(visitor Visitor)
- func (n *ConstantPathWriteNode) ChildNodes() []Node
- func (n *ConstantPathWriteNode) CompactChildNodes() []Node
- func (n *ConstantPathWriteNode) GetLocation() Location
- func (n *ConstantPathWriteNode) GetNodeID() int
- func (n *ConstantPathWriteNode) ToJSON() map[string]interface{}
- type ConstantReadNode
- func (n *ConstantReadNode) Accept(visitor Visitor)
- func (n *ConstantReadNode) ChildNodes() []Node
- func (n *ConstantReadNode) CompactChildNodes() []Node
- func (n *ConstantReadNode) GetLocation() Location
- func (n *ConstantReadNode) GetNodeID() int
- func (n *ConstantReadNode) ToJSON() map[string]interface{}
- type ConstantTargetNode
- func (n *ConstantTargetNode) Accept(visitor Visitor)
- func (n *ConstantTargetNode) ChildNodes() []Node
- func (n *ConstantTargetNode) CompactChildNodes() []Node
- func (n *ConstantTargetNode) GetLocation() Location
- func (n *ConstantTargetNode) GetNodeID() int
- func (n *ConstantTargetNode) ToJSON() map[string]interface{}
- type ConstantWriteNode
- func (n *ConstantWriteNode) Accept(visitor Visitor)
- func (n *ConstantWriteNode) ChildNodes() []Node
- func (n *ConstantWriteNode) CompactChildNodes() []Node
- func (n *ConstantWriteNode) GetLocation() Location
- func (n *ConstantWriteNode) GetNodeID() int
- func (n *ConstantWriteNode) ToJSON() map[string]interface{}
- type DefNode
- type DefaultLogger
- type DefaultVisitor
- func (v *DefaultVisitor) Visit(node Node)
- func (v *DefaultVisitor) VisitAliasGlobalVariableNode(node *AliasGlobalVariableNode)
- func (v *DefaultVisitor) VisitAliasMethodNode(node *AliasMethodNode)
- func (v *DefaultVisitor) VisitAll(nodes []Node)
- func (v *DefaultVisitor) VisitAlternationPatternNode(node *AlternationPatternNode)
- func (v *DefaultVisitor) VisitAndNode(node *AndNode)
- func (v *DefaultVisitor) VisitArgumentsNode(node *ArgumentsNode)
- func (v *DefaultVisitor) VisitArrayNode(node *ArrayNode)
- func (v *DefaultVisitor) VisitArrayPatternNode(node *ArrayPatternNode)
- func (v *DefaultVisitor) VisitAssocNode(node *AssocNode)
- func (v *DefaultVisitor) VisitAssocSplatNode(node *AssocSplatNode)
- func (v *DefaultVisitor) VisitBackReferenceReadNode(node *BackReferenceReadNode)
- func (v *DefaultVisitor) VisitBeginNode(node *BeginNode)
- func (v *DefaultVisitor) VisitBlockArgumentNode(node *BlockArgumentNode)
- func (v *DefaultVisitor) VisitBlockLocalVariableNode(node *BlockLocalVariableNode)
- func (v *DefaultVisitor) VisitBlockNode(node *BlockNode)
- func (v *DefaultVisitor) VisitBlockParameterNode(node *BlockParameterNode)
- func (v *DefaultVisitor) VisitBlockParametersNode(node *BlockParametersNode)
- func (v *DefaultVisitor) VisitBreakNode(node *BreakNode)
- func (v *DefaultVisitor) VisitCallAndWriteNode(node *CallAndWriteNode)
- func (v *DefaultVisitor) VisitCallNode(node *CallNode)
- func (v *DefaultVisitor) VisitCallOperatorWriteNode(node *CallOperatorWriteNode)
- func (v *DefaultVisitor) VisitCallOrWriteNode(node *CallOrWriteNode)
- func (v *DefaultVisitor) VisitCallTargetNode(node *CallTargetNode)
- func (v *DefaultVisitor) VisitCapturePatternNode(node *CapturePatternNode)
- func (v *DefaultVisitor) VisitCaseMatchNode(node *CaseMatchNode)
- func (v *DefaultVisitor) VisitCaseNode(node *CaseNode)
- func (v *DefaultVisitor) VisitChildNodes(node Node)
- func (v *DefaultVisitor) VisitClassNode(node *ClassNode)
- func (v *DefaultVisitor) VisitClassVariableAndWriteNode(node *ClassVariableAndWriteNode)
- func (v *DefaultVisitor) VisitClassVariableOperatorWriteNode(node *ClassVariableOperatorWriteNode)
- func (v *DefaultVisitor) VisitClassVariableOrWriteNode(node *ClassVariableOrWriteNode)
- func (v *DefaultVisitor) VisitClassVariableReadNode(node *ClassVariableReadNode)
- func (v *DefaultVisitor) VisitClassVariableTargetNode(node *ClassVariableTargetNode)
- func (v *DefaultVisitor) VisitClassVariableWriteNode(node *ClassVariableWriteNode)
- func (v *DefaultVisitor) VisitConstantAndWriteNode(node *ConstantAndWriteNode)
- func (v *DefaultVisitor) VisitConstantOperatorWriteNode(node *ConstantOperatorWriteNode)
- func (v *DefaultVisitor) VisitConstantOrWriteNode(node *ConstantOrWriteNode)
- func (v *DefaultVisitor) VisitConstantPathAndWriteNode(node *ConstantPathAndWriteNode)
- func (v *DefaultVisitor) VisitConstantPathNode(node *ConstantPathNode)
- func (v *DefaultVisitor) VisitConstantPathOperatorWriteNode(node *ConstantPathOperatorWriteNode)
- func (v *DefaultVisitor) VisitConstantPathOrWriteNode(node *ConstantPathOrWriteNode)
- func (v *DefaultVisitor) VisitConstantPathTargetNode(node *ConstantPathTargetNode)
- func (v *DefaultVisitor) VisitConstantPathWriteNode(node *ConstantPathWriteNode)
- func (v *DefaultVisitor) VisitConstantReadNode(node *ConstantReadNode)
- func (v *DefaultVisitor) VisitConstantTargetNode(node *ConstantTargetNode)
- func (v *DefaultVisitor) VisitConstantWriteNode(node *ConstantWriteNode)
- func (v *DefaultVisitor) VisitDefNode(node *DefNode)
- func (v *DefaultVisitor) VisitDefinedNode(node *DefinedNode)
- func (v *DefaultVisitor) VisitElseNode(node *ElseNode)
- func (v *DefaultVisitor) VisitEmbeddedStatementsNode(node *EmbeddedStatementsNode)
- func (v *DefaultVisitor) VisitEmbeddedVariableNode(node *EmbeddedVariableNode)
- func (v *DefaultVisitor) VisitEnsureNode(node *EnsureNode)
- func (v *DefaultVisitor) VisitFalseNode(node *FalseNode)
- func (v *DefaultVisitor) VisitFindPatternNode(node *FindPatternNode)
- func (v *DefaultVisitor) VisitFlipFlopNode(node *FlipFlopNode)
- func (v *DefaultVisitor) VisitFloatNode(node *FloatNode)
- func (v *DefaultVisitor) VisitForNode(node *ForNode)
- func (v *DefaultVisitor) VisitForwardingArgumentsNode(node *ForwardingArgumentsNode)
- func (v *DefaultVisitor) VisitForwardingParameterNode(node *ForwardingParameterNode)
- func (v *DefaultVisitor) VisitForwardingSuperNode(node *ForwardingSuperNode)
- func (v *DefaultVisitor) VisitGlobalVariableAndWriteNode(node *GlobalVariableAndWriteNode)
- func (v *DefaultVisitor) VisitGlobalVariableOperatorWriteNode(node *GlobalVariableOperatorWriteNode)
- func (v *DefaultVisitor) VisitGlobalVariableOrWriteNode(node *GlobalVariableOrWriteNode)
- func (v *DefaultVisitor) VisitGlobalVariableReadNode(node *GlobalVariableReadNode)
- func (v *DefaultVisitor) VisitGlobalVariableTargetNode(node *GlobalVariableTargetNode)
- func (v *DefaultVisitor) VisitGlobalVariableWriteNode(node *GlobalVariableWriteNode)
- func (v *DefaultVisitor) VisitHashNode(node *HashNode)
- func (v *DefaultVisitor) VisitHashPatternNode(node *HashPatternNode)
- func (v *DefaultVisitor) VisitIfNode(node *IfNode)
- func (v *DefaultVisitor) VisitImaginaryNode(node *ImaginaryNode)
- func (v *DefaultVisitor) VisitImplicitNode(node *ImplicitNode)
- func (v *DefaultVisitor) VisitImplicitRestNode(node *ImplicitRestNode)
- func (v *DefaultVisitor) VisitInNode(node *InNode)
- func (v *DefaultVisitor) VisitIndexAndWriteNode(node *IndexAndWriteNode)
- func (v *DefaultVisitor) VisitIndexOperatorWriteNode(node *IndexOperatorWriteNode)
- func (v *DefaultVisitor) VisitIndexOrWriteNode(node *IndexOrWriteNode)
- func (v *DefaultVisitor) VisitIndexTargetNode(node *IndexTargetNode)
- func (v *DefaultVisitor) VisitInstanceVariableAndWriteNode(node *InstanceVariableAndWriteNode)
- func (v *DefaultVisitor) VisitInstanceVariableOperatorWriteNode(node *InstanceVariableOperatorWriteNode)
- func (v *DefaultVisitor) VisitInstanceVariableOrWriteNode(node *InstanceVariableOrWriteNode)
- func (v *DefaultVisitor) VisitInstanceVariableReadNode(node *InstanceVariableReadNode)
- func (v *DefaultVisitor) VisitInstanceVariableTargetNode(node *InstanceVariableTargetNode)
- func (v *DefaultVisitor) VisitInstanceVariableWriteNode(node *InstanceVariableWriteNode)
- func (v *DefaultVisitor) VisitIntegerNode(node *IntegerNode)
- func (v *DefaultVisitor) VisitInterpolatedMatchLastLineNode(node *InterpolatedMatchLastLineNode)
- func (v *DefaultVisitor) VisitInterpolatedRegularExpressionNode(node *InterpolatedRegularExpressionNode)
- func (v *DefaultVisitor) VisitInterpolatedStringNode(node *InterpolatedStringNode)
- func (v *DefaultVisitor) VisitInterpolatedSymbolNode(node *InterpolatedSymbolNode)
- func (v *DefaultVisitor) VisitInterpolatedXStringNode(node *InterpolatedXStringNode)
- func (v *DefaultVisitor) VisitItLocalVariableReadNode(node *ItLocalVariableReadNode)
- func (v *DefaultVisitor) VisitItParametersNode(node *ItParametersNode)
- func (v *DefaultVisitor) VisitKeywordHashNode(node *KeywordHashNode)
- func (v *DefaultVisitor) VisitKeywordRestParameterNode(node *KeywordRestParameterNode)
- func (v *DefaultVisitor) VisitLambdaNode(node *LambdaNode)
- func (v *DefaultVisitor) VisitLocalVariableAndWriteNode(node *LocalVariableAndWriteNode)
- func (v *DefaultVisitor) VisitLocalVariableOperatorWriteNode(node *LocalVariableOperatorWriteNode)
- func (v *DefaultVisitor) VisitLocalVariableOrWriteNode(node *LocalVariableOrWriteNode)
- func (v *DefaultVisitor) VisitLocalVariableReadNode(node *LocalVariableReadNode)
- func (v *DefaultVisitor) VisitLocalVariableTargetNode(node *LocalVariableTargetNode)
- func (v *DefaultVisitor) VisitLocalVariableWriteNode(node *LocalVariableWriteNode)
- func (v *DefaultVisitor) VisitMatchLastLineNode(node *MatchLastLineNode)
- func (v *DefaultVisitor) VisitMatchPredicateNode(node *MatchPredicateNode)
- func (v *DefaultVisitor) VisitMatchRequiredNode(node *MatchRequiredNode)
- func (v *DefaultVisitor) VisitMatchWriteNode(node *MatchWriteNode)
- func (v *DefaultVisitor) VisitMissingNode(node *MissingNode)
- func (v *DefaultVisitor) VisitModuleNode(node *ModuleNode)
- func (v *DefaultVisitor) VisitMultiTargetNode(node *MultiTargetNode)
- func (v *DefaultVisitor) VisitMultiWriteNode(node *MultiWriteNode)
- func (v *DefaultVisitor) VisitNextNode(node *NextNode)
- func (v *DefaultVisitor) VisitNilNode(node *NilNode)
- func (v *DefaultVisitor) VisitNoKeywordsParameterNode(node *NoKeywordsParameterNode)
- func (v *DefaultVisitor) VisitNumberedParametersNode(node *NumberedParametersNode)
- func (v *DefaultVisitor) VisitNumberedReferenceReadNode(node *NumberedReferenceReadNode)
- func (v *DefaultVisitor) VisitOptionalKeywordParameterNode(node *OptionalKeywordParameterNode)
- func (v *DefaultVisitor) VisitOptionalParameterNode(node *OptionalParameterNode)
- func (v *DefaultVisitor) VisitOrNode(node *OrNode)
- func (v *DefaultVisitor) VisitParametersNode(node *ParametersNode)
- func (v *DefaultVisitor) VisitParenthesesNode(node *ParenthesesNode)
- func (v *DefaultVisitor) VisitPinnedExpressionNode(node *PinnedExpressionNode)
- func (v *DefaultVisitor) VisitPinnedVariableNode(node *PinnedVariableNode)
- func (v *DefaultVisitor) VisitPostExecutionNode(node *PostExecutionNode)
- func (v *DefaultVisitor) VisitPreExecutionNode(node *PreExecutionNode)
- func (v *DefaultVisitor) VisitProgramNode(node *ProgramNode)
- func (v *DefaultVisitor) VisitRangeNode(node *RangeNode)
- func (v *DefaultVisitor) VisitRationalNode(node *RationalNode)
- func (v *DefaultVisitor) VisitRedoNode(node *RedoNode)
- func (v *DefaultVisitor) VisitRegularExpressionNode(node *RegularExpressionNode)
- func (v *DefaultVisitor) VisitRequiredKeywordParameterNode(node *RequiredKeywordParameterNode)
- func (v *DefaultVisitor) VisitRequiredParameterNode(node *RequiredParameterNode)
- func (v *DefaultVisitor) VisitRescueModifierNode(node *RescueModifierNode)
- func (v *DefaultVisitor) VisitRescueNode(node *RescueNode)
- func (v *DefaultVisitor) VisitRestParameterNode(node *RestParameterNode)
- func (v *DefaultVisitor) VisitRetryNode(node *RetryNode)
- func (v *DefaultVisitor) VisitReturnNode(node *ReturnNode)
- func (v *DefaultVisitor) VisitSelfNode(node *SelfNode)
- func (v *DefaultVisitor) VisitShareableConstantNode(node *ShareableConstantNode)
- func (v *DefaultVisitor) VisitSingletonClassNode(node *SingletonClassNode)
- func (v *DefaultVisitor) VisitSourceEncodingNode(node *SourceEncodingNode)
- func (v *DefaultVisitor) VisitSourceFileNode(node *SourceFileNode)
- func (v *DefaultVisitor) VisitSourceLineNode(node *SourceLineNode)
- func (v *DefaultVisitor) VisitSplatNode(node *SplatNode)
- func (v *DefaultVisitor) VisitStatementsNode(node *StatementsNode)
- func (v *DefaultVisitor) VisitStringNode(node *StringNode)
- func (v *DefaultVisitor) VisitSuperNode(node *SuperNode)
- func (v *DefaultVisitor) VisitSymbolNode(node *SymbolNode)
- func (v *DefaultVisitor) VisitTrueNode(node *TrueNode)
- func (v *DefaultVisitor) VisitUndefNode(node *UndefNode)
- func (v *DefaultVisitor) VisitUnlessNode(node *UnlessNode)
- func (v *DefaultVisitor) VisitUntilNode(node *UntilNode)
- func (v *DefaultVisitor) VisitWhenNode(node *WhenNode)
- func (v *DefaultVisitor) VisitWhileNode(node *WhileNode)
- func (v *DefaultVisitor) VisitXStringNode(node *XStringNode)
- func (v *DefaultVisitor) VisitYieldNode(node *YieldNode)
- type DefinedNode
- type ElseNode
- type EmbeddedStatementsNode
- func (n *EmbeddedStatementsNode) Accept(visitor Visitor)
- func (n *EmbeddedStatementsNode) ChildNodes() []Node
- func (n *EmbeddedStatementsNode) CompactChildNodes() []Node
- func (n *EmbeddedStatementsNode) GetLocation() Location
- func (n *EmbeddedStatementsNode) GetNodeID() int
- func (n *EmbeddedStatementsNode) ToJSON() map[string]interface{}
- type EmbeddedVariableNode
- func (n *EmbeddedVariableNode) Accept(visitor Visitor)
- func (n *EmbeddedVariableNode) ChildNodes() []Node
- func (n *EmbeddedVariableNode) CompactChildNodes() []Node
- func (n *EmbeddedVariableNode) GetLocation() Location
- func (n *EmbeddedVariableNode) GetNodeID() int
- func (n *EmbeddedVariableNode) ToJSON() map[string]interface{}
- type EnsureNode
- type FalseNode
- type FindPatternNode
- type FlipFlopNode
- func (n *FlipFlopNode) Accept(visitor Visitor)
- func (n *FlipFlopNode) ChildNodes() []Node
- func (n *FlipFlopNode) CompactChildNodes() []Node
- func (n *FlipFlopNode) GetLocation() Location
- func (n *FlipFlopNode) GetNodeID() int
- func (n *FlipFlopNode) IsEXCLUDE_END() bool
- func (n *FlipFlopNode) ToJSON() map[string]interface{}
- type FloatNode
- type ForNode
- type ForwardingArgumentsNode
- func (n *ForwardingArgumentsNode) Accept(visitor Visitor)
- func (n *ForwardingArgumentsNode) ChildNodes() []Node
- func (n *ForwardingArgumentsNode) CompactChildNodes() []Node
- func (n *ForwardingArgumentsNode) GetLocation() Location
- func (n *ForwardingArgumentsNode) GetNodeID() int
- func (n *ForwardingArgumentsNode) ToJSON() map[string]interface{}
- type ForwardingParameterNode
- func (n *ForwardingParameterNode) Accept(visitor Visitor)
- func (n *ForwardingParameterNode) ChildNodes() []Node
- func (n *ForwardingParameterNode) CompactChildNodes() []Node
- func (n *ForwardingParameterNode) GetLocation() Location
- func (n *ForwardingParameterNode) GetNodeID() int
- func (n *ForwardingParameterNode) ToJSON() map[string]interface{}
- type ForwardingSuperNode
- func (n *ForwardingSuperNode) Accept(visitor Visitor)
- func (n *ForwardingSuperNode) ChildNodes() []Node
- func (n *ForwardingSuperNode) CompactChildNodes() []Node
- func (n *ForwardingSuperNode) GetLocation() Location
- func (n *ForwardingSuperNode) GetNodeID() int
- func (n *ForwardingSuperNode) ToJSON() map[string]interface{}
- type GlobalVariableAndWriteNode
- func (n *GlobalVariableAndWriteNode) Accept(visitor Visitor)
- func (n *GlobalVariableAndWriteNode) ChildNodes() []Node
- func (n *GlobalVariableAndWriteNode) CompactChildNodes() []Node
- func (n *GlobalVariableAndWriteNode) GetLocation() Location
- func (n *GlobalVariableAndWriteNode) GetNodeID() int
- func (n *GlobalVariableAndWriteNode) ToJSON() map[string]interface{}
- type GlobalVariableOperatorWriteNode
- func (n *GlobalVariableOperatorWriteNode) Accept(visitor Visitor)
- func (n *GlobalVariableOperatorWriteNode) ChildNodes() []Node
- func (n *GlobalVariableOperatorWriteNode) CompactChildNodes() []Node
- func (n *GlobalVariableOperatorWriteNode) GetLocation() Location
- func (n *GlobalVariableOperatorWriteNode) GetNodeID() int
- func (n *GlobalVariableOperatorWriteNode) ToJSON() map[string]interface{}
- type GlobalVariableOrWriteNode
- func (n *GlobalVariableOrWriteNode) Accept(visitor Visitor)
- func (n *GlobalVariableOrWriteNode) ChildNodes() []Node
- func (n *GlobalVariableOrWriteNode) CompactChildNodes() []Node
- func (n *GlobalVariableOrWriteNode) GetLocation() Location
- func (n *GlobalVariableOrWriteNode) GetNodeID() int
- func (n *GlobalVariableOrWriteNode) ToJSON() map[string]interface{}
- type GlobalVariableReadNode
- func (n *GlobalVariableReadNode) Accept(visitor Visitor)
- func (n *GlobalVariableReadNode) ChildNodes() []Node
- func (n *GlobalVariableReadNode) CompactChildNodes() []Node
- func (n *GlobalVariableReadNode) GetLocation() Location
- func (n *GlobalVariableReadNode) GetNodeID() int
- func (n *GlobalVariableReadNode) ToJSON() map[string]interface{}
- type GlobalVariableTargetNode
- func (n *GlobalVariableTargetNode) Accept(visitor Visitor)
- func (n *GlobalVariableTargetNode) ChildNodes() []Node
- func (n *GlobalVariableTargetNode) CompactChildNodes() []Node
- func (n *GlobalVariableTargetNode) GetLocation() Location
- func (n *GlobalVariableTargetNode) GetNodeID() int
- func (n *GlobalVariableTargetNode) ToJSON() map[string]interface{}
- type GlobalVariableWriteNode
- func (n *GlobalVariableWriteNode) Accept(visitor Visitor)
- func (n *GlobalVariableWriteNode) ChildNodes() []Node
- func (n *GlobalVariableWriteNode) CompactChildNodes() []Node
- func (n *GlobalVariableWriteNode) GetLocation() Location
- func (n *GlobalVariableWriteNode) GetNodeID() int
- func (n *GlobalVariableWriteNode) ToJSON() map[string]interface{}
- type HashNode
- type HashPatternNode
- type IfNode
- type ImaginaryNode
- type ImplicitNode
- type ImplicitRestNode
- func (n *ImplicitRestNode) Accept(visitor Visitor)
- func (n *ImplicitRestNode) ChildNodes() []Node
- func (n *ImplicitRestNode) CompactChildNodes() []Node
- func (n *ImplicitRestNode) GetLocation() Location
- func (n *ImplicitRestNode) GetNodeID() int
- func (n *ImplicitRestNode) ToJSON() map[string]interface{}
- type InNode
- type IndexAndWriteNode
- func (n *IndexAndWriteNode) Accept(visitor Visitor)
- func (n *IndexAndWriteNode) ChildNodes() []Node
- func (n *IndexAndWriteNode) CompactChildNodes() []Node
- func (n *IndexAndWriteNode) GetLocation() Location
- func (n *IndexAndWriteNode) GetNodeID() int
- func (n *IndexAndWriteNode) IsATTRIBUTE_WRITE() bool
- func (n *IndexAndWriteNode) IsIGNORE_VISIBILITY() bool
- func (n *IndexAndWriteNode) IsSAFE_NAVIGATION() bool
- func (n *IndexAndWriteNode) IsVARIABLE_CALL() bool
- func (n *IndexAndWriteNode) ToJSON() map[string]interface{}
- type IndexOperatorWriteNode
- func (n *IndexOperatorWriteNode) Accept(visitor Visitor)
- func (n *IndexOperatorWriteNode) ChildNodes() []Node
- func (n *IndexOperatorWriteNode) CompactChildNodes() []Node
- func (n *IndexOperatorWriteNode) GetLocation() Location
- func (n *IndexOperatorWriteNode) GetNodeID() int
- func (n *IndexOperatorWriteNode) IsATTRIBUTE_WRITE() bool
- func (n *IndexOperatorWriteNode) IsIGNORE_VISIBILITY() bool
- func (n *IndexOperatorWriteNode) IsSAFE_NAVIGATION() bool
- func (n *IndexOperatorWriteNode) IsVARIABLE_CALL() bool
- func (n *IndexOperatorWriteNode) ToJSON() map[string]interface{}
- type IndexOrWriteNode
- func (n *IndexOrWriteNode) Accept(visitor Visitor)
- func (n *IndexOrWriteNode) ChildNodes() []Node
- func (n *IndexOrWriteNode) CompactChildNodes() []Node
- func (n *IndexOrWriteNode) GetLocation() Location
- func (n *IndexOrWriteNode) GetNodeID() int
- func (n *IndexOrWriteNode) IsATTRIBUTE_WRITE() bool
- func (n *IndexOrWriteNode) IsIGNORE_VISIBILITY() bool
- func (n *IndexOrWriteNode) IsSAFE_NAVIGATION() bool
- func (n *IndexOrWriteNode) IsVARIABLE_CALL() bool
- func (n *IndexOrWriteNode) ToJSON() map[string]interface{}
- type IndexTargetNode
- func (n *IndexTargetNode) Accept(visitor Visitor)
- func (n *IndexTargetNode) ChildNodes() []Node
- func (n *IndexTargetNode) CompactChildNodes() []Node
- func (n *IndexTargetNode) GetLocation() Location
- func (n *IndexTargetNode) GetNodeID() int
- func (n *IndexTargetNode) IsATTRIBUTE_WRITE() bool
- func (n *IndexTargetNode) IsIGNORE_VISIBILITY() bool
- func (n *IndexTargetNode) IsSAFE_NAVIGATION() bool
- func (n *IndexTargetNode) IsVARIABLE_CALL() bool
- func (n *IndexTargetNode) ToJSON() map[string]interface{}
- type InstanceVariableAndWriteNode
- func (n *InstanceVariableAndWriteNode) Accept(visitor Visitor)
- func (n *InstanceVariableAndWriteNode) ChildNodes() []Node
- func (n *InstanceVariableAndWriteNode) CompactChildNodes() []Node
- func (n *InstanceVariableAndWriteNode) GetLocation() Location
- func (n *InstanceVariableAndWriteNode) GetNodeID() int
- func (n *InstanceVariableAndWriteNode) ToJSON() map[string]interface{}
- type InstanceVariableOperatorWriteNode
- func (n *InstanceVariableOperatorWriteNode) Accept(visitor Visitor)
- func (n *InstanceVariableOperatorWriteNode) ChildNodes() []Node
- func (n *InstanceVariableOperatorWriteNode) CompactChildNodes() []Node
- func (n *InstanceVariableOperatorWriteNode) GetLocation() Location
- func (n *InstanceVariableOperatorWriteNode) GetNodeID() int
- func (n *InstanceVariableOperatorWriteNode) ToJSON() map[string]interface{}
- type InstanceVariableOrWriteNode
- func (n *InstanceVariableOrWriteNode) Accept(visitor Visitor)
- func (n *InstanceVariableOrWriteNode) ChildNodes() []Node
- func (n *InstanceVariableOrWriteNode) CompactChildNodes() []Node
- func (n *InstanceVariableOrWriteNode) GetLocation() Location
- func (n *InstanceVariableOrWriteNode) GetNodeID() int
- func (n *InstanceVariableOrWriteNode) ToJSON() map[string]interface{}
- type InstanceVariableReadNode
- func (n *InstanceVariableReadNode) Accept(visitor Visitor)
- func (n *InstanceVariableReadNode) ChildNodes() []Node
- func (n *InstanceVariableReadNode) CompactChildNodes() []Node
- func (n *InstanceVariableReadNode) GetLocation() Location
- func (n *InstanceVariableReadNode) GetNodeID() int
- func (n *InstanceVariableReadNode) ToJSON() map[string]interface{}
- type InstanceVariableTargetNode
- func (n *InstanceVariableTargetNode) Accept(visitor Visitor)
- func (n *InstanceVariableTargetNode) ChildNodes() []Node
- func (n *InstanceVariableTargetNode) CompactChildNodes() []Node
- func (n *InstanceVariableTargetNode) GetLocation() Location
- func (n *InstanceVariableTargetNode) GetNodeID() int
- func (n *InstanceVariableTargetNode) ToJSON() map[string]interface{}
- type InstanceVariableWriteNode
- func (n *InstanceVariableWriteNode) Accept(visitor Visitor)
- func (n *InstanceVariableWriteNode) ChildNodes() []Node
- func (n *InstanceVariableWriteNode) CompactChildNodes() []Node
- func (n *InstanceVariableWriteNode) GetLocation() Location
- func (n *InstanceVariableWriteNode) GetNodeID() int
- func (n *InstanceVariableWriteNode) ToJSON() map[string]interface{}
- type IntegerNode
- func (n *IntegerNode) Accept(visitor Visitor)
- func (n *IntegerNode) ChildNodes() []Node
- func (n *IntegerNode) CompactChildNodes() []Node
- func (n *IntegerNode) GetLocation() Location
- func (n *IntegerNode) GetNodeID() int
- func (n *IntegerNode) IsBINARY() bool
- func (n *IntegerNode) IsDECIMAL() bool
- func (n *IntegerNode) IsHEXADECIMAL() bool
- func (n *IntegerNode) IsOCTAL() bool
- func (n *IntegerNode) ToJSON() map[string]interface{}
- type InterpolatedMatchLastLineNode
- func (n *InterpolatedMatchLastLineNode) Accept(visitor Visitor)
- func (n *InterpolatedMatchLastLineNode) ChildNodes() []Node
- func (n *InterpolatedMatchLastLineNode) CompactChildNodes() []Node
- func (n *InterpolatedMatchLastLineNode) GetLocation() Location
- func (n *InterpolatedMatchLastLineNode) GetNodeID() int
- func (n *InterpolatedMatchLastLineNode) IsASCII_8BIT() bool
- func (n *InterpolatedMatchLastLineNode) IsEUC_JP() bool
- func (n *InterpolatedMatchLastLineNode) IsEXTENDED() bool
- func (n *InterpolatedMatchLastLineNode) IsFORCED_BINARY_ENCODING() bool
- func (n *InterpolatedMatchLastLineNode) IsFORCED_US_ASCII_ENCODING() bool
- func (n *InterpolatedMatchLastLineNode) IsFORCED_UTF8_ENCODING() bool
- func (n *InterpolatedMatchLastLineNode) IsIGNORE_CASE() bool
- func (n *InterpolatedMatchLastLineNode) IsMULTI_LINE() bool
- func (n *InterpolatedMatchLastLineNode) IsONCE() bool
- func (n *InterpolatedMatchLastLineNode) IsUTF_8() bool
- func (n *InterpolatedMatchLastLineNode) IsWINDOWS_31J() bool
- func (n *InterpolatedMatchLastLineNode) ToJSON() map[string]interface{}
- type InterpolatedRegularExpressionNode
- func (n *InterpolatedRegularExpressionNode) Accept(visitor Visitor)
- func (n *InterpolatedRegularExpressionNode) ChildNodes() []Node
- func (n *InterpolatedRegularExpressionNode) CompactChildNodes() []Node
- func (n *InterpolatedRegularExpressionNode) GetLocation() Location
- func (n *InterpolatedRegularExpressionNode) GetNodeID() int
- func (n *InterpolatedRegularExpressionNode) IsASCII_8BIT() bool
- func (n *InterpolatedRegularExpressionNode) IsEUC_JP() bool
- func (n *InterpolatedRegularExpressionNode) IsEXTENDED() bool
- func (n *InterpolatedRegularExpressionNode) IsFORCED_BINARY_ENCODING() bool
- func (n *InterpolatedRegularExpressionNode) IsFORCED_US_ASCII_ENCODING() bool
- func (n *InterpolatedRegularExpressionNode) IsFORCED_UTF8_ENCODING() bool
- func (n *InterpolatedRegularExpressionNode) IsIGNORE_CASE() bool
- func (n *InterpolatedRegularExpressionNode) IsMULTI_LINE() bool
- func (n *InterpolatedRegularExpressionNode) IsONCE() bool
- func (n *InterpolatedRegularExpressionNode) IsUTF_8() bool
- func (n *InterpolatedRegularExpressionNode) IsWINDOWS_31J() bool
- func (n *InterpolatedRegularExpressionNode) ToJSON() map[string]interface{}
- type InterpolatedStringNode
- func (n *InterpolatedStringNode) Accept(visitor Visitor)
- func (n *InterpolatedStringNode) ChildNodes() []Node
- func (n *InterpolatedStringNode) CompactChildNodes() []Node
- func (n *InterpolatedStringNode) GetLocation() Location
- func (n *InterpolatedStringNode) GetNodeID() int
- func (n *InterpolatedStringNode) IsFROZEN() bool
- func (n *InterpolatedStringNode) IsMUTABLE() bool
- func (n *InterpolatedStringNode) ToJSON() map[string]interface{}
- type InterpolatedSymbolNode
- func (n *InterpolatedSymbolNode) Accept(visitor Visitor)
- func (n *InterpolatedSymbolNode) ChildNodes() []Node
- func (n *InterpolatedSymbolNode) CompactChildNodes() []Node
- func (n *InterpolatedSymbolNode) GetLocation() Location
- func (n *InterpolatedSymbolNode) GetNodeID() int
- func (n *InterpolatedSymbolNode) ToJSON() map[string]interface{}
- type InterpolatedXStringNode
- func (n *InterpolatedXStringNode) Accept(visitor Visitor)
- func (n *InterpolatedXStringNode) ChildNodes() []Node
- func (n *InterpolatedXStringNode) CompactChildNodes() []Node
- func (n *InterpolatedXStringNode) GetLocation() Location
- func (n *InterpolatedXStringNode) GetNodeID() int
- func (n *InterpolatedXStringNode) ToJSON() map[string]interface{}
- type ItLocalVariableReadNode
- func (n *ItLocalVariableReadNode) Accept(visitor Visitor)
- func (n *ItLocalVariableReadNode) ChildNodes() []Node
- func (n *ItLocalVariableReadNode) CompactChildNodes() []Node
- func (n *ItLocalVariableReadNode) GetLocation() Location
- func (n *ItLocalVariableReadNode) GetNodeID() int
- func (n *ItLocalVariableReadNode) ToJSON() map[string]interface{}
- type ItParametersNode
- func (n *ItParametersNode) Accept(visitor Visitor)
- func (n *ItParametersNode) ChildNodes() []Node
- func (n *ItParametersNode) CompactChildNodes() []Node
- func (n *ItParametersNode) GetLocation() Location
- func (n *ItParametersNode) GetNodeID() int
- func (n *ItParametersNode) ToJSON() map[string]interface{}
- type KeywordHashNode
- func (n *KeywordHashNode) Accept(visitor Visitor)
- func (n *KeywordHashNode) ChildNodes() []Node
- func (n *KeywordHashNode) CompactChildNodes() []Node
- func (n *KeywordHashNode) GetLocation() Location
- func (n *KeywordHashNode) GetNodeID() int
- func (n *KeywordHashNode) IsSYMBOL_KEYS() bool
- func (n *KeywordHashNode) ToJSON() map[string]interface{}
- type KeywordRestParameterNode
- func (n *KeywordRestParameterNode) Accept(visitor Visitor)
- func (n *KeywordRestParameterNode) ChildNodes() []Node
- func (n *KeywordRestParameterNode) CompactChildNodes() []Node
- func (n *KeywordRestParameterNode) GetLocation() Location
- func (n *KeywordRestParameterNode) GetNodeID() int
- func (n *KeywordRestParameterNode) IsREPEATED_PARAMETER() bool
- func (n *KeywordRestParameterNode) ToJSON() map[string]interface{}
- type LambdaNode
- type LocalVariableAndWriteNode
- func (n *LocalVariableAndWriteNode) Accept(visitor Visitor)
- func (n *LocalVariableAndWriteNode) ChildNodes() []Node
- func (n *LocalVariableAndWriteNode) CompactChildNodes() []Node
- func (n *LocalVariableAndWriteNode) GetLocation() Location
- func (n *LocalVariableAndWriteNode) GetNodeID() int
- func (n *LocalVariableAndWriteNode) ToJSON() map[string]interface{}
- type LocalVariableOperatorWriteNode
- func (n *LocalVariableOperatorWriteNode) Accept(visitor Visitor)
- func (n *LocalVariableOperatorWriteNode) ChildNodes() []Node
- func (n *LocalVariableOperatorWriteNode) CompactChildNodes() []Node
- func (n *LocalVariableOperatorWriteNode) GetLocation() Location
- func (n *LocalVariableOperatorWriteNode) GetNodeID() int
- func (n *LocalVariableOperatorWriteNode) ToJSON() map[string]interface{}
- type LocalVariableOrWriteNode
- func (n *LocalVariableOrWriteNode) Accept(visitor Visitor)
- func (n *LocalVariableOrWriteNode) ChildNodes() []Node
- func (n *LocalVariableOrWriteNode) CompactChildNodes() []Node
- func (n *LocalVariableOrWriteNode) GetLocation() Location
- func (n *LocalVariableOrWriteNode) GetNodeID() int
- func (n *LocalVariableOrWriteNode) ToJSON() map[string]interface{}
- type LocalVariableReadNode
- func (n *LocalVariableReadNode) Accept(visitor Visitor)
- func (n *LocalVariableReadNode) ChildNodes() []Node
- func (n *LocalVariableReadNode) CompactChildNodes() []Node
- func (n *LocalVariableReadNode) GetLocation() Location
- func (n *LocalVariableReadNode) GetNodeID() int
- func (n *LocalVariableReadNode) ToJSON() map[string]interface{}
- type LocalVariableTargetNode
- func (n *LocalVariableTargetNode) Accept(visitor Visitor)
- func (n *LocalVariableTargetNode) ChildNodes() []Node
- func (n *LocalVariableTargetNode) CompactChildNodes() []Node
- func (n *LocalVariableTargetNode) GetLocation() Location
- func (n *LocalVariableTargetNode) GetNodeID() int
- func (n *LocalVariableTargetNode) ToJSON() map[string]interface{}
- type LocalVariableWriteNode
- func (n *LocalVariableWriteNode) Accept(visitor Visitor)
- func (n *LocalVariableWriteNode) ChildNodes() []Node
- func (n *LocalVariableWriteNode) CompactChildNodes() []Node
- func (n *LocalVariableWriteNode) GetLocation() Location
- func (n *LocalVariableWriteNode) GetNodeID() int
- func (n *LocalVariableWriteNode) ToJSON() map[string]interface{}
- type Location
- type Logger
- type MagicComment
- type MatchLastLineNode
- func (n *MatchLastLineNode) Accept(visitor Visitor)
- func (n *MatchLastLineNode) ChildNodes() []Node
- func (n *MatchLastLineNode) CompactChildNodes() []Node
- func (n *MatchLastLineNode) GetLocation() Location
- func (n *MatchLastLineNode) GetNodeID() int
- func (n *MatchLastLineNode) IsASCII_8BIT() bool
- func (n *MatchLastLineNode) IsEUC_JP() bool
- func (n *MatchLastLineNode) IsEXTENDED() bool
- func (n *MatchLastLineNode) IsFORCED_BINARY_ENCODING() bool
- func (n *MatchLastLineNode) IsFORCED_US_ASCII_ENCODING() bool
- func (n *MatchLastLineNode) IsFORCED_UTF8_ENCODING() bool
- func (n *MatchLastLineNode) IsIGNORE_CASE() bool
- func (n *MatchLastLineNode) IsMULTI_LINE() bool
- func (n *MatchLastLineNode) IsONCE() bool
- func (n *MatchLastLineNode) IsUTF_8() bool
- func (n *MatchLastLineNode) IsWINDOWS_31J() bool
- func (n *MatchLastLineNode) ToJSON() map[string]interface{}
- type MatchPredicateNode
- func (n *MatchPredicateNode) Accept(visitor Visitor)
- func (n *MatchPredicateNode) ChildNodes() []Node
- func (n *MatchPredicateNode) CompactChildNodes() []Node
- func (n *MatchPredicateNode) GetLocation() Location
- func (n *MatchPredicateNode) GetNodeID() int
- func (n *MatchPredicateNode) ToJSON() map[string]interface{}
- type MatchRequiredNode
- func (n *MatchRequiredNode) Accept(visitor Visitor)
- func (n *MatchRequiredNode) ChildNodes() []Node
- func (n *MatchRequiredNode) CompactChildNodes() []Node
- func (n *MatchRequiredNode) GetLocation() Location
- func (n *MatchRequiredNode) GetNodeID() int
- func (n *MatchRequiredNode) ToJSON() map[string]interface{}
- type MatchWriteNode
- type MissingNode
- type ModuleNode
- type MultiTargetNode
- type MultiWriteNode
- type NextNode
- type NilNode
- type NoKeywordsParameterNode
- func (n *NoKeywordsParameterNode) Accept(visitor Visitor)
- func (n *NoKeywordsParameterNode) ChildNodes() []Node
- func (n *NoKeywordsParameterNode) CompactChildNodes() []Node
- func (n *NoKeywordsParameterNode) GetLocation() Location
- func (n *NoKeywordsParameterNode) GetNodeID() int
- func (n *NoKeywordsParameterNode) ToJSON() map[string]interface{}
- type Node
- type NullLogger
- type NumberedParametersNode
- func (n *NumberedParametersNode) Accept(visitor Visitor)
- func (n *NumberedParametersNode) ChildNodes() []Node
- func (n *NumberedParametersNode) CompactChildNodes() []Node
- func (n *NumberedParametersNode) GetLocation() Location
- func (n *NumberedParametersNode) GetNodeID() int
- func (n *NumberedParametersNode) ToJSON() map[string]interface{}
- type NumberedReferenceReadNode
- func (n *NumberedReferenceReadNode) Accept(visitor Visitor)
- func (n *NumberedReferenceReadNode) ChildNodes() []Node
- func (n *NumberedReferenceReadNode) CompactChildNodes() []Node
- func (n *NumberedReferenceReadNode) GetLocation() Location
- func (n *NumberedReferenceReadNode) GetNodeID() int
- func (n *NumberedReferenceReadNode) ToJSON() map[string]interface{}
- type OptionalKeywordParameterNode
- func (n *OptionalKeywordParameterNode) Accept(visitor Visitor)
- func (n *OptionalKeywordParameterNode) ChildNodes() []Node
- func (n *OptionalKeywordParameterNode) CompactChildNodes() []Node
- func (n *OptionalKeywordParameterNode) GetLocation() Location
- func (n *OptionalKeywordParameterNode) GetNodeID() int
- func (n *OptionalKeywordParameterNode) IsREPEATED_PARAMETER() bool
- func (n *OptionalKeywordParameterNode) ToJSON() map[string]interface{}
- type OptionalParameterNode
- func (n *OptionalParameterNode) Accept(visitor Visitor)
- func (n *OptionalParameterNode) ChildNodes() []Node
- func (n *OptionalParameterNode) CompactChildNodes() []Node
- func (n *OptionalParameterNode) GetLocation() Location
- func (n *OptionalParameterNode) GetNodeID() int
- func (n *OptionalParameterNode) IsREPEATED_PARAMETER() bool
- func (n *OptionalParameterNode) ToJSON() map[string]interface{}
- type OrNode
- type ParametersNode
- type ParenthesesNode
- func (n *ParenthesesNode) Accept(visitor Visitor)
- func (n *ParenthesesNode) ChildNodes() []Node
- func (n *ParenthesesNode) CompactChildNodes() []Node
- func (n *ParenthesesNode) GetLocation() Location
- func (n *ParenthesesNode) GetNodeID() int
- func (n *ParenthesesNode) IsMULTIPLE_STATEMENTS() bool
- func (n *ParenthesesNode) ToJSON() map[string]interface{}
- type ParseError
- type ParseResult
- type ParseWarning
- type Parser
- type ParserOption
- func WithCommandLine(commandLine []CommandLine) ParserOption
- func WithEncoding(encoding string) ParserOption
- func WithEncodingLocked(encodingLocked bool) ParserOption
- func WithFilePath(filepath string) ParserOption
- func WithFrozenStringLiteral(frozenStringLiteral bool) ParserOption
- func WithLine(line int) ParserOption
- func WithLogger(logger Logger) ParserOption
- func WithMainScript(mainScript bool) ParserOption
- func WithPartialScript(partialScript bool) ParserOption
- func WithScopes(scopes [][][]byte) ParserOption
- func WithVersion(version SyntaxVersion) ParserOption
- type PinnedExpressionNode
- func (n *PinnedExpressionNode) Accept(visitor Visitor)
- func (n *PinnedExpressionNode) ChildNodes() []Node
- func (n *PinnedExpressionNode) CompactChildNodes() []Node
- func (n *PinnedExpressionNode) GetLocation() Location
- func (n *PinnedExpressionNode) GetNodeID() int
- func (n *PinnedExpressionNode) ToJSON() map[string]interface{}
- type PinnedVariableNode
- func (n *PinnedVariableNode) Accept(visitor Visitor)
- func (n *PinnedVariableNode) ChildNodes() []Node
- func (n *PinnedVariableNode) CompactChildNodes() []Node
- func (n *PinnedVariableNode) GetLocation() Location
- func (n *PinnedVariableNode) GetNodeID() int
- func (n *PinnedVariableNode) ToJSON() map[string]interface{}
- type PostExecutionNode
- func (n *PostExecutionNode) Accept(visitor Visitor)
- func (n *PostExecutionNode) ChildNodes() []Node
- func (n *PostExecutionNode) CompactChildNodes() []Node
- func (n *PostExecutionNode) GetLocation() Location
- func (n *PostExecutionNode) GetNodeID() int
- func (n *PostExecutionNode) ToJSON() map[string]interface{}
- type PreExecutionNode
- func (n *PreExecutionNode) Accept(visitor Visitor)
- func (n *PreExecutionNode) ChildNodes() []Node
- func (n *PreExecutionNode) CompactChildNodes() []Node
- func (n *PreExecutionNode) GetLocation() Location
- func (n *PreExecutionNode) GetNodeID() int
- func (n *PreExecutionNode) ToJSON() map[string]interface{}
- type ProgramNode
- type RangeNode
- func (n *RangeNode) Accept(visitor Visitor)
- func (n *RangeNode) ChildNodes() []Node
- func (n *RangeNode) CompactChildNodes() []Node
- func (n *RangeNode) GetLocation() Location
- func (n *RangeNode) GetNodeID() int
- func (n *RangeNode) IsEXCLUDE_END() bool
- func (n *RangeNode) ToJSON() map[string]interface{}
- type RationalNode
- func (n *RationalNode) Accept(visitor Visitor)
- func (n *RationalNode) ChildNodes() []Node
- func (n *RationalNode) CompactChildNodes() []Node
- func (n *RationalNode) GetLocation() Location
- func (n *RationalNode) GetNodeID() int
- func (n *RationalNode) IsBINARY() bool
- func (n *RationalNode) IsDECIMAL() bool
- func (n *RationalNode) IsHEXADECIMAL() bool
- func (n *RationalNode) IsOCTAL() bool
- func (n *RationalNode) ToJSON() map[string]interface{}
- type RedoNode
- type RegularExpressionNode
- func (n *RegularExpressionNode) Accept(visitor Visitor)
- func (n *RegularExpressionNode) ChildNodes() []Node
- func (n *RegularExpressionNode) CompactChildNodes() []Node
- func (n *RegularExpressionNode) GetLocation() Location
- func (n *RegularExpressionNode) GetNodeID() int
- func (n *RegularExpressionNode) IsASCII_8BIT() bool
- func (n *RegularExpressionNode) IsEUC_JP() bool
- func (n *RegularExpressionNode) IsEXTENDED() bool
- func (n *RegularExpressionNode) IsFORCED_BINARY_ENCODING() bool
- func (n *RegularExpressionNode) IsFORCED_US_ASCII_ENCODING() bool
- func (n *RegularExpressionNode) IsFORCED_UTF8_ENCODING() bool
- func (n *RegularExpressionNode) IsIGNORE_CASE() bool
- func (n *RegularExpressionNode) IsMULTI_LINE() bool
- func (n *RegularExpressionNode) IsONCE() bool
- func (n *RegularExpressionNode) IsUTF_8() bool
- func (n *RegularExpressionNode) IsWINDOWS_31J() bool
- func (n *RegularExpressionNode) ToJSON() map[string]interface{}
- type RequiredKeywordParameterNode
- func (n *RequiredKeywordParameterNode) Accept(visitor Visitor)
- func (n *RequiredKeywordParameterNode) ChildNodes() []Node
- func (n *RequiredKeywordParameterNode) CompactChildNodes() []Node
- func (n *RequiredKeywordParameterNode) GetLocation() Location
- func (n *RequiredKeywordParameterNode) GetNodeID() int
- func (n *RequiredKeywordParameterNode) IsREPEATED_PARAMETER() bool
- func (n *RequiredKeywordParameterNode) ToJSON() map[string]interface{}
- type RequiredParameterNode
- func (n *RequiredParameterNode) Accept(visitor Visitor)
- func (n *RequiredParameterNode) ChildNodes() []Node
- func (n *RequiredParameterNode) CompactChildNodes() []Node
- func (n *RequiredParameterNode) GetLocation() Location
- func (n *RequiredParameterNode) GetNodeID() int
- func (n *RequiredParameterNode) IsREPEATED_PARAMETER() bool
- func (n *RequiredParameterNode) ToJSON() map[string]interface{}
- type RescueModifierNode
- func (n *RescueModifierNode) Accept(visitor Visitor)
- func (n *RescueModifierNode) ChildNodes() []Node
- func (n *RescueModifierNode) CompactChildNodes() []Node
- func (n *RescueModifierNode) GetLocation() Location
- func (n *RescueModifierNode) GetNodeID() int
- func (n *RescueModifierNode) ToJSON() map[string]interface{}
- type RescueNode
- type RestParameterNode
- func (n *RestParameterNode) Accept(visitor Visitor)
- func (n *RestParameterNode) ChildNodes() []Node
- func (n *RestParameterNode) CompactChildNodes() []Node
- func (n *RestParameterNode) GetLocation() Location
- func (n *RestParameterNode) GetNodeID() int
- func (n *RestParameterNode) IsREPEATED_PARAMETER() bool
- func (n *RestParameterNode) ToJSON() map[string]interface{}
- type RetryNode
- type ReturnNode
- type RubyString
- type SeekableBuffer
- func (sb *SeekableBuffer) Bytes() []byte
- func (sb *SeekableBuffer) Get(pos int) byte
- func (sb *SeekableBuffer) Len() int
- func (sb *SeekableBuffer) Position() int
- func (sb *SeekableBuffer) Read(p []byte) (int, error)
- func (sb *SeekableBuffer) ReadByte() (byte, error)
- func (sb *SeekableBuffer) Seek(offset int)
- func (sb *SeekableBuffer) SetPosition(pos int)
- func (sb *SeekableBuffer) Write(p []byte) (int, error)
- type SelfNode
- type SerializationBuffer
- func (b *SerializationBuffer) ReadDouble() float64
- func (b *SerializationBuffer) ReadLocation() Location
- func (b *SerializationBuffer) ReadOptionalLocation() *Location
- func (b *SerializationBuffer) ReadRawByte() byte
- func (b *SerializationBuffer) ReadRawBytes(length int) []byte
- func (b *SerializationBuffer) ReadString(length int, flags uint32) string
- func (b *SerializationBuffer) ReadStringField(flags uint32) RubyString
- func (b *SerializationBuffer) ReadUint32() uint32
- func (b *SerializationBuffer) ReadVarInt() int
- func (b *SerializationBuffer) ScanConstant(constantPoolOffset int, constantIndex int) string
- type ShareableConstantNode
- func (n *ShareableConstantNode) Accept(visitor Visitor)
- func (n *ShareableConstantNode) ChildNodes() []Node
- func (n *ShareableConstantNode) CompactChildNodes() []Node
- func (n *ShareableConstantNode) GetLocation() Location
- func (n *ShareableConstantNode) GetNodeID() int
- func (n *ShareableConstantNode) IsEXPERIMENTAL_COPY() bool
- func (n *ShareableConstantNode) IsEXPERIMENTAL_EVERYTHING() bool
- func (n *ShareableConstantNode) IsLITERAL() bool
- func (n *ShareableConstantNode) ToJSON() map[string]interface{}
- type SingletonClassNode
- func (n *SingletonClassNode) Accept(visitor Visitor)
- func (n *SingletonClassNode) ChildNodes() []Node
- func (n *SingletonClassNode) CompactChildNodes() []Node
- func (n *SingletonClassNode) GetLocation() Location
- func (n *SingletonClassNode) GetNodeID() int
- func (n *SingletonClassNode) ToJSON() map[string]interface{}
- type Source
- type SourceEncodingNode
- func (n *SourceEncodingNode) Accept(visitor Visitor)
- func (n *SourceEncodingNode) ChildNodes() []Node
- func (n *SourceEncodingNode) CompactChildNodes() []Node
- func (n *SourceEncodingNode) GetLocation() Location
- func (n *SourceEncodingNode) GetNodeID() int
- func (n *SourceEncodingNode) ToJSON() map[string]interface{}
- type SourceFileNode
- func (n *SourceFileNode) Accept(visitor Visitor)
- func (n *SourceFileNode) ChildNodes() []Node
- func (n *SourceFileNode) CompactChildNodes() []Node
- func (n *SourceFileNode) GetLocation() Location
- func (n *SourceFileNode) GetNodeID() int
- func (n *SourceFileNode) IsFORCED_BINARY_ENCODING() bool
- func (n *SourceFileNode) IsFORCED_UTF8_ENCODING() bool
- func (n *SourceFileNode) IsFROZEN() bool
- func (n *SourceFileNode) IsMUTABLE() bool
- func (n *SourceFileNode) ToJSON() map[string]interface{}
- type SourceLineNode
- type SplatNode
- type StatementsNode
- type StringNode
- func (n *StringNode) Accept(visitor Visitor)
- func (n *StringNode) ChildNodes() []Node
- func (n *StringNode) CompactChildNodes() []Node
- func (n *StringNode) GetLocation() Location
- func (n *StringNode) GetNodeID() int
- func (n *StringNode) IsFORCED_BINARY_ENCODING() bool
- func (n *StringNode) IsFORCED_UTF8_ENCODING() bool
- func (n *StringNode) IsFROZEN() bool
- func (n *StringNode) IsMUTABLE() bool
- func (n *StringNode) ToJSON() map[string]interface{}
- type SuperNode
- type SymbolNode
- func (n *SymbolNode) Accept(visitor Visitor)
- func (n *SymbolNode) ChildNodes() []Node
- func (n *SymbolNode) CompactChildNodes() []Node
- func (n *SymbolNode) GetLocation() Location
- func (n *SymbolNode) GetNodeID() int
- func (n *SymbolNode) IsFORCED_BINARY_ENCODING() bool
- func (n *SymbolNode) IsFORCED_US_ASCII_ENCODING() bool
- func (n *SymbolNode) IsFORCED_UTF8_ENCODING() bool
- func (n *SymbolNode) ToJSON() map[string]interface{}
- type SyntaxVersion
- type TrueNode
- type UndefNode
- type UnlessNode
- type UntilNode
- func (n *UntilNode) Accept(visitor Visitor)
- func (n *UntilNode) ChildNodes() []Node
- func (n *UntilNode) CompactChildNodes() []Node
- func (n *UntilNode) GetLocation() Location
- func (n *UntilNode) GetNodeID() int
- func (n *UntilNode) IsBEGIN_MODIFIER() bool
- func (n *UntilNode) ToJSON() map[string]interface{}
- type Visitor
- type WhenNode
- type WhileNode
- func (n *WhileNode) Accept(visitor Visitor)
- func (n *WhileNode) ChildNodes() []Node
- func (n *WhileNode) CompactChildNodes() []Node
- func (n *WhileNode) GetLocation() Location
- func (n *WhileNode) GetNodeID() int
- func (n *WhileNode) IsBEGIN_MODIFIER() bool
- func (n *WhileNode) ToJSON() map[string]interface{}
- type XStringNode
- func (n *XStringNode) Accept(visitor Visitor)
- func (n *XStringNode) ChildNodes() []Node
- func (n *XStringNode) CompactChildNodes() []Node
- func (n *XStringNode) GetLocation() Location
- func (n *XStringNode) GetNodeID() int
- func (n *XStringNode) IsFORCED_BINARY_ENCODING() bool
- func (n *XStringNode) IsFORCED_UTF8_ENCODING() bool
- func (n *XStringNode) ToJSON() map[string]interface{}
- type YieldNode
Constants ¶
const ( ArgumentsNodeFlagsCONTAINS_FORWARDING = 1 << 2 ArgumentsNodeFlagsCONTAINS_KEYWORDS = 1 << 3 ArgumentsNodeFlagsCONTAINS_KEYWORD_SPLAT = 1 << 4 ArgumentsNodeFlagsCONTAINS_SPLAT = 1 << 5 ArgumentsNodeFlagsCONTAINS_MULTIPLE_SPLATS = 1 << 6 )
Flags for arguments nodes.
const ( CallNodeFlagsSAFE_NAVIGATION = 1 << 2 CallNodeFlagsVARIABLE_CALL = 1 << 3 CallNodeFlagsATTRIBUTE_WRITE = 1 << 4 CallNodeFlagsIGNORE_VISIBILITY = 1 << 5 )
Flags for call nodes.
const ( EncodingFlagsFORCED_UTF8_ENCODING = 1 << 2 EncodingFlagsFORCED_BINARY_ENCODING = 1 << 3 )
Flags for nodes that have unescaped content.
const ( IntegerBaseFlagsBINARY = 1 << 2 IntegerBaseFlagsDECIMAL = 1 << 3 IntegerBaseFlagsOCTAL = 1 << 4 IntegerBaseFlagsHEXADECIMAL = 1 << 5 )
Flags for integer nodes that correspond to the base of the integer.
const ( InterpolatedStringNodeFlagsFROZEN = 1 << 2 InterpolatedStringNodeFlagsMUTABLE = 1 << 3 )
Flags for interpolated string nodes that indicated mutability if they are also marked as literals.
const ( RegularExpressionFlagsIGNORE_CASE = 1 << 2 RegularExpressionFlagsEXTENDED = 1 << 3 RegularExpressionFlagsMULTI_LINE = 1 << 4 RegularExpressionFlagsONCE = 1 << 5 RegularExpressionFlagsEUC_JP = 1 << 6 RegularExpressionFlagsASCII_8BIT = 1 << 7 RegularExpressionFlagsWINDOWS_31J = 1 << 8 RegularExpressionFlagsUTF_8 = 1 << 9 RegularExpressionFlagsFORCED_UTF8_ENCODING = 1 << 10 RegularExpressionFlagsFORCED_BINARY_ENCODING = 1 << 11 RegularExpressionFlagsFORCED_US_ASCII_ENCODING = 1 << 12 )
Flags for regular expression and match last line nodes.
const ()
Flags for shareable constant nodes.
const ( StringFlagsFORCED_UTF8_ENCODING = 1 << 2 StringFlagsFORCED_BINARY_ENCODING = 1 << 3 StringFlagsFROZEN = 1 << 4 StringFlagsMUTABLE = 1 << 5 )
Flags for string nodes.
const ( SymbolFlagsFORCED_UTF8_ENCODING = 1 << 2 SymbolFlagsFORCED_BINARY_ENCODING = 1 << 3 SymbolFlagsFORCED_US_ASCII_ENCODING = 1 << 4 )
Flags for symbol nodes.
const (
ArrayNodeFlagsCONTAINS_SPLAT = 1 << 2
)
Flags for array nodes.
const (
KeywordHashNodeFlagsSYMBOL_KEYS = 1 << 2
)
Flags for keyword hash nodes.
const (
LoopFlagsBEGIN_MODIFIER = 1 << 2
)
Flags for while and until loop nodes.
const (
ParameterFlagsREPEATED_PARAMETER = 1 << 2
)
Flags for parameter nodes.
const (
ParenthesesNodeFlagsMULTIPLE_STATEMENTS = 1 << 2
)
Flags for parentheses nodes.
const (
RangeFlagsEXCLUDE_END = 1 << 2
)
Flags for range and flip-flop nodes.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AliasGlobalVariableNode ¶
type AliasGlobalVariableNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` NewName Node `json:"new_name"` OldName Node `json:"old_name"` KeywordLoc Location `json:"keyword_loc"` // contains filtered or unexported fields }
Represents the use of the `alias` keyword to alias a global variable.
alias $foo $bar ^^^^^^^^^^^^^^^
func NewAliasGlobalVariableNode ¶
func NewAliasGlobalVariableNode(nodeID int, location Location, flags uint32, new_name Node, old_name Node, keyword_loc Location) *AliasGlobalVariableNode
NewAliasGlobalVariableNode creates a new AliasGlobalVariableNode.
func (*AliasGlobalVariableNode) Accept ¶
func (n *AliasGlobalVariableNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*AliasGlobalVariableNode) ChildNodes ¶ added in v1.1.0
func (n *AliasGlobalVariableNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*AliasGlobalVariableNode) CompactChildNodes ¶ added in v1.1.0
func (n *AliasGlobalVariableNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*AliasGlobalVariableNode) GetLocation ¶ added in v1.1.0
func (n *AliasGlobalVariableNode) GetLocation() Location
GetLocation returns the location of this node.
func (*AliasGlobalVariableNode) GetNodeID ¶ added in v1.1.0
func (n *AliasGlobalVariableNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*AliasGlobalVariableNode) ToJSON ¶ added in v1.1.0
func (n *AliasGlobalVariableNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type AliasMethodNode ¶
type AliasMethodNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` NewName Node `json:"new_name"` OldName Node `json:"old_name"` KeywordLoc Location `json:"keyword_loc"` // contains filtered or unexported fields }
Represents the use of the `alias` keyword to alias a method.
alias foo bar ^^^^^^^^^^^^^
func NewAliasMethodNode ¶
func NewAliasMethodNode(nodeID int, location Location, flags uint32, new_name Node, old_name Node, keyword_loc Location) *AliasMethodNode
NewAliasMethodNode creates a new AliasMethodNode.
func (*AliasMethodNode) Accept ¶
func (n *AliasMethodNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*AliasMethodNode) ChildNodes ¶ added in v1.1.0
func (n *AliasMethodNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*AliasMethodNode) CompactChildNodes ¶ added in v1.1.0
func (n *AliasMethodNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*AliasMethodNode) GetLocation ¶ added in v1.1.0
func (n *AliasMethodNode) GetLocation() Location
GetLocation returns the location of this node.
func (*AliasMethodNode) GetNodeID ¶ added in v1.1.0
func (n *AliasMethodNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*AliasMethodNode) ToJSON ¶ added in v1.1.0
func (n *AliasMethodNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type AlternationPatternNode ¶
type AlternationPatternNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Left Node `json:"left"` Right Node `json:"right"` OperatorLoc Location `json:"operator_loc"` // contains filtered or unexported fields }
Represents an alternation pattern in pattern matching.
foo => bar | baz ^^^^^^^^^
func NewAlternationPatternNode ¶
func NewAlternationPatternNode(nodeID int, location Location, flags uint32, left Node, right Node, operator_loc Location) *AlternationPatternNode
NewAlternationPatternNode creates a new AlternationPatternNode.
func (*AlternationPatternNode) Accept ¶
func (n *AlternationPatternNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*AlternationPatternNode) ChildNodes ¶ added in v1.1.0
func (n *AlternationPatternNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*AlternationPatternNode) CompactChildNodes ¶ added in v1.1.0
func (n *AlternationPatternNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*AlternationPatternNode) GetLocation ¶ added in v1.1.0
func (n *AlternationPatternNode) GetLocation() Location
GetLocation returns the location of this node.
func (*AlternationPatternNode) GetNodeID ¶ added in v1.1.0
func (n *AlternationPatternNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*AlternationPatternNode) ToJSON ¶ added in v1.1.0
func (n *AlternationPatternNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type AndNode ¶
type AndNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Left Node `json:"left"` Right Node `json:"right"` OperatorLoc Location `json:"operator_loc"` // contains filtered or unexported fields }
Represents the use of the `&&` operator or the `and` keyword.
left and right ^^^^^^^^^^^^^^
func NewAndNode ¶
func NewAndNode(nodeID int, location Location, flags uint32, left Node, right Node, operator_loc Location) *AndNode
NewAndNode creates a new AndNode.
func (*AndNode) ChildNodes ¶ added in v1.1.0
ChildNodes returns all child nodes of the current node.
func (*AndNode) CompactChildNodes ¶ added in v1.1.0
CompactChildNodes returns all non-nil child nodes.
func (*AndNode) GetLocation ¶ added in v1.1.0
GetLocation returns the location of this node.
type ArgumentsNode ¶
type ArgumentsNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Arguments []Node `json:"arguments"` // contains filtered or unexported fields }
Represents a set of arguments to a method or a keyword.
return foo, bar, baz ^^^^^^^^^^^^^
func NewArgumentsNode ¶
func NewArgumentsNode(nodeID int, location Location, flags uint32, arguments []Node) *ArgumentsNode
NewArgumentsNode creates a new ArgumentsNode.
func (*ArgumentsNode) Accept ¶
func (n *ArgumentsNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*ArgumentsNode) ChildNodes ¶ added in v1.1.0
func (n *ArgumentsNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*ArgumentsNode) CompactChildNodes ¶ added in v1.1.0
func (n *ArgumentsNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*ArgumentsNode) GetLocation ¶ added in v1.1.0
func (n *ArgumentsNode) GetLocation() Location
GetLocation returns the location of this node.
func (*ArgumentsNode) GetNodeID ¶ added in v1.1.0
func (n *ArgumentsNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*ArgumentsNode) IsCONTAINS_FORWARDING ¶ added in v1.1.0
func (n *ArgumentsNode) IsCONTAINS_FORWARDING() bool
IsCONTAINS_FORWARDING returns true if this node has the CONTAINS_FORWARDING flag.
func (*ArgumentsNode) IsCONTAINS_KEYWORDS ¶ added in v1.1.0
func (n *ArgumentsNode) IsCONTAINS_KEYWORDS() bool
IsCONTAINS_KEYWORDS returns true if this node has the CONTAINS_KEYWORDS flag.
func (*ArgumentsNode) IsCONTAINS_KEYWORD_SPLAT ¶ added in v1.1.0
func (n *ArgumentsNode) IsCONTAINS_KEYWORD_SPLAT() bool
IsCONTAINS_KEYWORD_SPLAT returns true if this node has the CONTAINS_KEYWORD_SPLAT flag.
func (*ArgumentsNode) IsCONTAINS_MULTIPLE_SPLATS ¶ added in v1.1.0
func (n *ArgumentsNode) IsCONTAINS_MULTIPLE_SPLATS() bool
IsCONTAINS_MULTIPLE_SPLATS returns true if this node has the CONTAINS_MULTIPLE_SPLATS flag.
func (*ArgumentsNode) IsCONTAINS_SPLAT ¶ added in v1.1.0
func (n *ArgumentsNode) IsCONTAINS_SPLAT() bool
IsCONTAINS_SPLAT returns true if this node has the CONTAINS_SPLAT flag.
func (*ArgumentsNode) ToJSON ¶ added in v1.1.0
func (n *ArgumentsNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type ArrayNode ¶
type ArrayNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Elements []Node `json:"elements"` OpeningLoc *Location `json:"opening_loc"` ClosingLoc *Location `json:"closing_loc"` // contains filtered or unexported fields }
Represents an array literal. This can be a regular array using brackets or a special array using % like %w or %i.
[1, 2, 3] ^^^^^^^^^
func NewArrayNode ¶
func NewArrayNode(nodeID int, location Location, flags uint32, elements []Node, opening_loc *Location, closing_loc *Location) *ArrayNode
NewArrayNode creates a new ArrayNode.
func (*ArrayNode) ChildNodes ¶ added in v1.1.0
ChildNodes returns all child nodes of the current node.
func (*ArrayNode) CompactChildNodes ¶ added in v1.1.0
CompactChildNodes returns all non-nil child nodes.
func (*ArrayNode) GetLocation ¶ added in v1.1.0
GetLocation returns the location of this node.
func (*ArrayNode) IsCONTAINS_SPLAT ¶ added in v1.1.0
IsCONTAINS_SPLAT returns true if this node has the CONTAINS_SPLAT flag.
type ArrayPatternNode ¶
type ArrayPatternNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Constant Node `json:"constant"` Requireds []Node `json:"requireds"` Rest Node `json:"rest"` Posts []Node `json:"posts"` OpeningLoc *Location `json:"opening_loc"` ClosingLoc *Location `json:"closing_loc"` // contains filtered or unexported fields }
Represents an array pattern in pattern matching.
foo in 1, 2 ^^^^^^^^^^^ foo in [1, 2] ^^^^^^^^^^^^^ foo in *bar ^^^^^^^^^^^ foo in Bar[] ^^^^^^^^^^^^ foo in Bar[1, 2, 3] ^^^^^^^^^^^^^^^^^^^
func NewArrayPatternNode ¶
func NewArrayPatternNode(nodeID int, location Location, flags uint32, constant Node, requireds []Node, rest Node, posts []Node, opening_loc *Location, closing_loc *Location) *ArrayPatternNode
NewArrayPatternNode creates a new ArrayPatternNode.
func (*ArrayPatternNode) Accept ¶
func (n *ArrayPatternNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*ArrayPatternNode) ChildNodes ¶ added in v1.1.0
func (n *ArrayPatternNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*ArrayPatternNode) CompactChildNodes ¶ added in v1.1.0
func (n *ArrayPatternNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*ArrayPatternNode) GetLocation ¶ added in v1.1.0
func (n *ArrayPatternNode) GetLocation() Location
GetLocation returns the location of this node.
func (*ArrayPatternNode) GetNodeID ¶ added in v1.1.0
func (n *ArrayPatternNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*ArrayPatternNode) ToJSON ¶ added in v1.1.0
func (n *ArrayPatternNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type AssocNode ¶
type AssocNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Key Node `json:"key"` Value Node `json:"value"` OperatorLoc *Location `json:"operator_loc"` // contains filtered or unexported fields }
Represents a hash key/value pair.
{ a => b } ^^^^^^
func NewAssocNode ¶
func NewAssocNode(nodeID int, location Location, flags uint32, key Node, value Node, operator_loc *Location) *AssocNode
NewAssocNode creates a new AssocNode.
func (*AssocNode) ChildNodes ¶ added in v1.1.0
ChildNodes returns all child nodes of the current node.
func (*AssocNode) CompactChildNodes ¶ added in v1.1.0
CompactChildNodes returns all non-nil child nodes.
func (*AssocNode) GetLocation ¶ added in v1.1.0
GetLocation returns the location of this node.
type AssocSplatNode ¶
type AssocSplatNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Value Node `json:"value"` OperatorLoc Location `json:"operator_loc"` // contains filtered or unexported fields }
Represents a splat in a hash literal.
{ **foo } ^^^^^
func NewAssocSplatNode ¶
func NewAssocSplatNode(nodeID int, location Location, flags uint32, value Node, operator_loc Location) *AssocSplatNode
NewAssocSplatNode creates a new AssocSplatNode.
func (*AssocSplatNode) Accept ¶
func (n *AssocSplatNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*AssocSplatNode) ChildNodes ¶ added in v1.1.0
func (n *AssocSplatNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*AssocSplatNode) CompactChildNodes ¶ added in v1.1.0
func (n *AssocSplatNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*AssocSplatNode) GetLocation ¶ added in v1.1.0
func (n *AssocSplatNode) GetLocation() Location
GetLocation returns the location of this node.
func (*AssocSplatNode) GetNodeID ¶ added in v1.1.0
func (n *AssocSplatNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*AssocSplatNode) ToJSON ¶ added in v1.1.0
func (n *AssocSplatNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type BackReferenceReadNode ¶
type BackReferenceReadNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Name string `json:"name"` // contains filtered or unexported fields }
Represents reading a reference to a field in the previous match.
$' ^^
func NewBackReferenceReadNode ¶
func NewBackReferenceReadNode(nodeID int, location Location, flags uint32, name string) *BackReferenceReadNode
NewBackReferenceReadNode creates a new BackReferenceReadNode.
func (*BackReferenceReadNode) Accept ¶
func (n *BackReferenceReadNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*BackReferenceReadNode) ChildNodes ¶ added in v1.1.0
func (n *BackReferenceReadNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*BackReferenceReadNode) CompactChildNodes ¶ added in v1.1.0
func (n *BackReferenceReadNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*BackReferenceReadNode) GetLocation ¶ added in v1.1.0
func (n *BackReferenceReadNode) GetLocation() Location
GetLocation returns the location of this node.
func (*BackReferenceReadNode) GetNodeID ¶ added in v1.1.0
func (n *BackReferenceReadNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*BackReferenceReadNode) ToJSON ¶ added in v1.1.0
func (n *BackReferenceReadNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type BasicVisitor ¶ added in v1.1.0
type BasicVisitor interface { // Visit calls Accept on the given node if it is not nil, which in turn should // call back into this visitor by calling the appropriate Visit* method. Visit(node Node) // VisitAll visits each node in the slice by calling Accept on each one. VisitAll(nodes []Node) // VisitChildNodes visits the child nodes of the given node by calling Accept on each one. VisitChildNodes(node Node) }
BasicVisitor provides the interface for walking down the tree. None of the individual visit methods are implemented on this interface, so it forces the consumer to implement each one that they need. For a default implementation that continues walking the tree, see the `Visitor` interface and `DefaultVisitor` struct.
type BeginNode ¶
type BeginNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` BeginKeywordLoc *Location `json:"begin_keyword_loc"` Statements *StatementsNode `json:"statements"` RescueClause *RescueNode `json:"rescue_clause"` ElseClause *ElseNode `json:"else_clause"` EnsureClause *EnsureNode `json:"ensure_clause"` EndKeywordLoc *Location `json:"end_keyword_loc"` // contains filtered or unexported fields }
Represents a begin statement.
begin foo end ^^^^^
func NewBeginNode ¶
func NewBeginNode(nodeID int, location Location, flags uint32, begin_keyword_loc *Location, statements *StatementsNode, rescue_clause *RescueNode, else_clause *ElseNode, ensure_clause *EnsureNode, end_keyword_loc *Location) *BeginNode
NewBeginNode creates a new BeginNode.
func (*BeginNode) ChildNodes ¶ added in v1.1.0
ChildNodes returns all child nodes of the current node.
func (*BeginNode) CompactChildNodes ¶ added in v1.1.0
CompactChildNodes returns all non-nil child nodes.
func (*BeginNode) GetLocation ¶ added in v1.1.0
GetLocation returns the location of this node.
type BlockArgumentNode ¶
type BlockArgumentNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Expression Node `json:"expression"` OperatorLoc Location `json:"operator_loc"` // contains filtered or unexported fields }
Represents a block argument using `&`.
bar(&args) ^^^^^^^^^^
func NewBlockArgumentNode ¶
func NewBlockArgumentNode(nodeID int, location Location, flags uint32, expression Node, operator_loc Location) *BlockArgumentNode
NewBlockArgumentNode creates a new BlockArgumentNode.
func (*BlockArgumentNode) Accept ¶
func (n *BlockArgumentNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*BlockArgumentNode) ChildNodes ¶ added in v1.1.0
func (n *BlockArgumentNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*BlockArgumentNode) CompactChildNodes ¶ added in v1.1.0
func (n *BlockArgumentNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*BlockArgumentNode) GetLocation ¶ added in v1.1.0
func (n *BlockArgumentNode) GetLocation() Location
GetLocation returns the location of this node.
func (*BlockArgumentNode) GetNodeID ¶ added in v1.1.0
func (n *BlockArgumentNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*BlockArgumentNode) ToJSON ¶ added in v1.1.0
func (n *BlockArgumentNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type BlockLocalVariableNode ¶
type BlockLocalVariableNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Name string `json:"name"` // contains filtered or unexported fields }
Represents a block local variable.
a { |; b| } ^
func NewBlockLocalVariableNode ¶
func NewBlockLocalVariableNode(nodeID int, location Location, flags uint32, name string) *BlockLocalVariableNode
NewBlockLocalVariableNode creates a new BlockLocalVariableNode.
func (*BlockLocalVariableNode) Accept ¶
func (n *BlockLocalVariableNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*BlockLocalVariableNode) ChildNodes ¶ added in v1.1.0
func (n *BlockLocalVariableNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*BlockLocalVariableNode) CompactChildNodes ¶ added in v1.1.0
func (n *BlockLocalVariableNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*BlockLocalVariableNode) GetLocation ¶ added in v1.1.0
func (n *BlockLocalVariableNode) GetLocation() Location
GetLocation returns the location of this node.
func (*BlockLocalVariableNode) GetNodeID ¶ added in v1.1.0
func (n *BlockLocalVariableNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*BlockLocalVariableNode) IsREPEATED_PARAMETER ¶ added in v1.1.0
func (n *BlockLocalVariableNode) IsREPEATED_PARAMETER() bool
IsREPEATED_PARAMETER returns true if this node has the REPEATED_PARAMETER flag.
func (*BlockLocalVariableNode) ToJSON ¶ added in v1.1.0
func (n *BlockLocalVariableNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type BlockNode ¶
type BlockNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Locals []string `json:"locals"` Parameters Node `json:"parameters"` Body Node `json:"body"` OpeningLoc Location `json:"opening_loc"` ClosingLoc Location `json:"closing_loc"` // contains filtered or unexported fields }
Represents a block of ruby code.
[1, 2, 3].each { |i| puts x } ^^^^^^^^^^^^^^
func NewBlockNode ¶
func NewBlockNode(nodeID int, location Location, flags uint32, locals []string, parameters Node, body Node, opening_loc Location, closing_loc Location) *BlockNode
NewBlockNode creates a new BlockNode.
func (*BlockNode) ChildNodes ¶ added in v1.1.0
ChildNodes returns all child nodes of the current node.
func (*BlockNode) CompactChildNodes ¶ added in v1.1.0
CompactChildNodes returns all non-nil child nodes.
func (*BlockNode) GetLocation ¶ added in v1.1.0
GetLocation returns the location of this node.
type BlockParameterNode ¶
type BlockParameterNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Name *string `json:"name"` NameLoc *Location `json:"name_loc"` OperatorLoc Location `json:"operator_loc"` // contains filtered or unexported fields }
Represents a block parameter of a method, block, or lambda definition.
def a(&b) ^^ end
func NewBlockParameterNode ¶
func NewBlockParameterNode(nodeID int, location Location, flags uint32, name *string, name_loc *Location, operator_loc Location) *BlockParameterNode
NewBlockParameterNode creates a new BlockParameterNode.
func (*BlockParameterNode) Accept ¶
func (n *BlockParameterNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*BlockParameterNode) ChildNodes ¶ added in v1.1.0
func (n *BlockParameterNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*BlockParameterNode) CompactChildNodes ¶ added in v1.1.0
func (n *BlockParameterNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*BlockParameterNode) GetLocation ¶ added in v1.1.0
func (n *BlockParameterNode) GetLocation() Location
GetLocation returns the location of this node.
func (*BlockParameterNode) GetNodeID ¶ added in v1.1.0
func (n *BlockParameterNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*BlockParameterNode) IsREPEATED_PARAMETER ¶ added in v1.1.0
func (n *BlockParameterNode) IsREPEATED_PARAMETER() bool
IsREPEATED_PARAMETER returns true if this node has the REPEATED_PARAMETER flag.
func (*BlockParameterNode) ToJSON ¶ added in v1.1.0
func (n *BlockParameterNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type BlockParametersNode ¶
type BlockParametersNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Parameters *ParametersNode `json:"parameters"` Locals []Node `json:"locals"` OpeningLoc *Location `json:"opening_loc"` ClosingLoc *Location `json:"closing_loc"` // contains filtered or unexported fields }
Represents a block's parameters declaration.
-> (a, b = 1; local) { } ^^^^^^^^^^^^^^^^^ foo do |a, b = 1; local| ^^^^^^^^^^^^^^^^^ end
func NewBlockParametersNode ¶
func NewBlockParametersNode(nodeID int, location Location, flags uint32, parameters *ParametersNode, locals []Node, opening_loc *Location, closing_loc *Location) *BlockParametersNode
NewBlockParametersNode creates a new BlockParametersNode.
func (*BlockParametersNode) Accept ¶
func (n *BlockParametersNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*BlockParametersNode) ChildNodes ¶ added in v1.1.0
func (n *BlockParametersNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*BlockParametersNode) CompactChildNodes ¶ added in v1.1.0
func (n *BlockParametersNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*BlockParametersNode) GetLocation ¶ added in v1.1.0
func (n *BlockParametersNode) GetLocation() Location
GetLocation returns the location of this node.
func (*BlockParametersNode) GetNodeID ¶ added in v1.1.0
func (n *BlockParametersNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*BlockParametersNode) ToJSON ¶ added in v1.1.0
func (n *BlockParametersNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type BreakNode ¶
type BreakNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Arguments *ArgumentsNode `json:"arguments"` KeywordLoc Location `json:"keyword_loc"` // contains filtered or unexported fields }
Represents the use of the `break` keyword.
break foo ^^^^^^^^^
func NewBreakNode ¶
func NewBreakNode(nodeID int, location Location, flags uint32, arguments *ArgumentsNode, keyword_loc Location) *BreakNode
NewBreakNode creates a new BreakNode.
func (*BreakNode) ChildNodes ¶ added in v1.1.0
ChildNodes returns all child nodes of the current node.
func (*BreakNode) CompactChildNodes ¶ added in v1.1.0
CompactChildNodes returns all non-nil child nodes.
func (*BreakNode) GetLocation ¶ added in v1.1.0
GetLocation returns the location of this node.
type CallAndWriteNode ¶
type CallAndWriteNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Receiver Node `json:"receiver"` CallOperatorLoc *Location `json:"call_operator_loc"` MessageLoc *Location `json:"message_loc"` ReadName string `json:"read_name"` WriteName string `json:"write_name"` OperatorLoc Location `json:"operator_loc"` Value Node `json:"value"` // contains filtered or unexported fields }
Represents the use of the `&&=` operator on a call.
foo.bar &&= value ^^^^^^^^^^^^^^^^^
func NewCallAndWriteNode ¶
func NewCallAndWriteNode(nodeID int, location Location, flags uint32, receiver Node, call_operator_loc *Location, message_loc *Location, read_name string, write_name string, operator_loc Location, value Node) *CallAndWriteNode
NewCallAndWriteNode creates a new CallAndWriteNode.
func (*CallAndWriteNode) Accept ¶
func (n *CallAndWriteNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*CallAndWriteNode) ChildNodes ¶ added in v1.1.0
func (n *CallAndWriteNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*CallAndWriteNode) CompactChildNodes ¶ added in v1.1.0
func (n *CallAndWriteNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*CallAndWriteNode) GetLocation ¶ added in v1.1.0
func (n *CallAndWriteNode) GetLocation() Location
GetLocation returns the location of this node.
func (*CallAndWriteNode) GetNodeID ¶ added in v1.1.0
func (n *CallAndWriteNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*CallAndWriteNode) IsATTRIBUTE_WRITE ¶ added in v1.1.0
func (n *CallAndWriteNode) IsATTRIBUTE_WRITE() bool
IsATTRIBUTE_WRITE returns true if this node has the ATTRIBUTE_WRITE flag.
func (*CallAndWriteNode) IsIGNORE_VISIBILITY ¶ added in v1.1.0
func (n *CallAndWriteNode) IsIGNORE_VISIBILITY() bool
IsIGNORE_VISIBILITY returns true if this node has the IGNORE_VISIBILITY flag.
func (*CallAndWriteNode) IsSAFE_NAVIGATION ¶ added in v1.1.0
func (n *CallAndWriteNode) IsSAFE_NAVIGATION() bool
IsSAFE_NAVIGATION returns true if this node has the SAFE_NAVIGATION flag.
func (*CallAndWriteNode) IsVARIABLE_CALL ¶ added in v1.1.0
func (n *CallAndWriteNode) IsVARIABLE_CALL() bool
IsVARIABLE_CALL returns true if this node has the VARIABLE_CALL flag.
func (*CallAndWriteNode) ToJSON ¶ added in v1.1.0
func (n *CallAndWriteNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type CallNode ¶
type CallNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Receiver Node `json:"receiver"` CallOperatorLoc *Location `json:"call_operator_loc"` Name string `json:"name"` MessageLoc *Location `json:"message_loc"` OpeningLoc *Location `json:"opening_loc"` Arguments *ArgumentsNode `json:"arguments"` ClosingLoc *Location `json:"closing_loc"` Block Node `json:"block"` // contains filtered or unexported fields }
Represents a method call, in all of the various forms that can take.
foo ^^^ foo() ^^^^^ +foo ^^^^ foo + bar ^^^^^^^^^ foo.bar ^^^^^^^ foo&.bar ^^^^^^^^
func NewCallNode ¶
func NewCallNode(nodeID int, location Location, flags uint32, receiver Node, call_operator_loc *Location, name string, message_loc *Location, opening_loc *Location, arguments *ArgumentsNode, closing_loc *Location, block Node) *CallNode
NewCallNode creates a new CallNode.
func (*CallNode) ChildNodes ¶ added in v1.1.0
ChildNodes returns all child nodes of the current node.
func (*CallNode) CompactChildNodes ¶ added in v1.1.0
CompactChildNodes returns all non-nil child nodes.
func (*CallNode) GetLocation ¶ added in v1.1.0
GetLocation returns the location of this node.
func (*CallNode) IsATTRIBUTE_WRITE ¶ added in v1.1.0
IsATTRIBUTE_WRITE returns true if this node has the ATTRIBUTE_WRITE flag.
func (*CallNode) IsIGNORE_VISIBILITY ¶ added in v1.1.0
IsIGNORE_VISIBILITY returns true if this node has the IGNORE_VISIBILITY flag.
func (*CallNode) IsSAFE_NAVIGATION ¶ added in v1.1.0
IsSAFE_NAVIGATION returns true if this node has the SAFE_NAVIGATION flag.
func (*CallNode) IsVARIABLE_CALL ¶ added in v1.1.0
IsVARIABLE_CALL returns true if this node has the VARIABLE_CALL flag.
type CallOperatorWriteNode ¶
type CallOperatorWriteNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Receiver Node `json:"receiver"` CallOperatorLoc *Location `json:"call_operator_loc"` MessageLoc *Location `json:"message_loc"` ReadName string `json:"read_name"` WriteName string `json:"write_name"` BinaryOperator string `json:"binary_operator"` BinaryOperatorLoc Location `json:"binary_operator_loc"` Value Node `json:"value"` // contains filtered or unexported fields }
Represents the use of an assignment operator on a call.
foo.bar += baz ^^^^^^^^^^^^^^
func NewCallOperatorWriteNode ¶
func NewCallOperatorWriteNode(nodeID int, location Location, flags uint32, receiver Node, call_operator_loc *Location, message_loc *Location, read_name string, write_name string, binary_operator string, binary_operator_loc Location, value Node) *CallOperatorWriteNode
NewCallOperatorWriteNode creates a new CallOperatorWriteNode.
func (*CallOperatorWriteNode) Accept ¶
func (n *CallOperatorWriteNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*CallOperatorWriteNode) ChildNodes ¶ added in v1.1.0
func (n *CallOperatorWriteNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*CallOperatorWriteNode) CompactChildNodes ¶ added in v1.1.0
func (n *CallOperatorWriteNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*CallOperatorWriteNode) GetLocation ¶ added in v1.1.0
func (n *CallOperatorWriteNode) GetLocation() Location
GetLocation returns the location of this node.
func (*CallOperatorWriteNode) GetNodeID ¶ added in v1.1.0
func (n *CallOperatorWriteNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*CallOperatorWriteNode) IsATTRIBUTE_WRITE ¶ added in v1.1.0
func (n *CallOperatorWriteNode) IsATTRIBUTE_WRITE() bool
IsATTRIBUTE_WRITE returns true if this node has the ATTRIBUTE_WRITE flag.
func (*CallOperatorWriteNode) IsIGNORE_VISIBILITY ¶ added in v1.1.0
func (n *CallOperatorWriteNode) IsIGNORE_VISIBILITY() bool
IsIGNORE_VISIBILITY returns true if this node has the IGNORE_VISIBILITY flag.
func (*CallOperatorWriteNode) IsSAFE_NAVIGATION ¶ added in v1.1.0
func (n *CallOperatorWriteNode) IsSAFE_NAVIGATION() bool
IsSAFE_NAVIGATION returns true if this node has the SAFE_NAVIGATION flag.
func (*CallOperatorWriteNode) IsVARIABLE_CALL ¶ added in v1.1.0
func (n *CallOperatorWriteNode) IsVARIABLE_CALL() bool
IsVARIABLE_CALL returns true if this node has the VARIABLE_CALL flag.
func (*CallOperatorWriteNode) ToJSON ¶ added in v1.1.0
func (n *CallOperatorWriteNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type CallOrWriteNode ¶
type CallOrWriteNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Receiver Node `json:"receiver"` CallOperatorLoc *Location `json:"call_operator_loc"` MessageLoc *Location `json:"message_loc"` ReadName string `json:"read_name"` WriteName string `json:"write_name"` OperatorLoc Location `json:"operator_loc"` Value Node `json:"value"` // contains filtered or unexported fields }
Represents the use of the `||=` operator on a call.
foo.bar ||= value ^^^^^^^^^^^^^^^^^
func NewCallOrWriteNode ¶
func NewCallOrWriteNode(nodeID int, location Location, flags uint32, receiver Node, call_operator_loc *Location, message_loc *Location, read_name string, write_name string, operator_loc Location, value Node) *CallOrWriteNode
NewCallOrWriteNode creates a new CallOrWriteNode.
func (*CallOrWriteNode) Accept ¶
func (n *CallOrWriteNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*CallOrWriteNode) ChildNodes ¶ added in v1.1.0
func (n *CallOrWriteNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*CallOrWriteNode) CompactChildNodes ¶ added in v1.1.0
func (n *CallOrWriteNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*CallOrWriteNode) GetLocation ¶ added in v1.1.0
func (n *CallOrWriteNode) GetLocation() Location
GetLocation returns the location of this node.
func (*CallOrWriteNode) GetNodeID ¶ added in v1.1.0
func (n *CallOrWriteNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*CallOrWriteNode) IsATTRIBUTE_WRITE ¶ added in v1.1.0
func (n *CallOrWriteNode) IsATTRIBUTE_WRITE() bool
IsATTRIBUTE_WRITE returns true if this node has the ATTRIBUTE_WRITE flag.
func (*CallOrWriteNode) IsIGNORE_VISIBILITY ¶ added in v1.1.0
func (n *CallOrWriteNode) IsIGNORE_VISIBILITY() bool
IsIGNORE_VISIBILITY returns true if this node has the IGNORE_VISIBILITY flag.
func (*CallOrWriteNode) IsSAFE_NAVIGATION ¶ added in v1.1.0
func (n *CallOrWriteNode) IsSAFE_NAVIGATION() bool
IsSAFE_NAVIGATION returns true if this node has the SAFE_NAVIGATION flag.
func (*CallOrWriteNode) IsVARIABLE_CALL ¶ added in v1.1.0
func (n *CallOrWriteNode) IsVARIABLE_CALL() bool
IsVARIABLE_CALL returns true if this node has the VARIABLE_CALL flag.
func (*CallOrWriteNode) ToJSON ¶ added in v1.1.0
func (n *CallOrWriteNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type CallTargetNode ¶
type CallTargetNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Receiver Node `json:"receiver"` CallOperatorLoc Location `json:"call_operator_loc"` Name string `json:"name"` MessageLoc Location `json:"message_loc"` // contains filtered or unexported fields }
Represents assigning to a method call.
foo.bar, = 1 ^^^^^^^ begin rescue => foo.bar ^^^^^^^ end for foo.bar in baz do end ^^^^^^^
func NewCallTargetNode ¶
func NewCallTargetNode(nodeID int, location Location, flags uint32, receiver Node, call_operator_loc Location, name string, message_loc Location) *CallTargetNode
NewCallTargetNode creates a new CallTargetNode.
func (*CallTargetNode) Accept ¶
func (n *CallTargetNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*CallTargetNode) ChildNodes ¶ added in v1.1.0
func (n *CallTargetNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*CallTargetNode) CompactChildNodes ¶ added in v1.1.0
func (n *CallTargetNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*CallTargetNode) GetLocation ¶ added in v1.1.0
func (n *CallTargetNode) GetLocation() Location
GetLocation returns the location of this node.
func (*CallTargetNode) GetNodeID ¶ added in v1.1.0
func (n *CallTargetNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*CallTargetNode) IsATTRIBUTE_WRITE ¶ added in v1.1.0
func (n *CallTargetNode) IsATTRIBUTE_WRITE() bool
IsATTRIBUTE_WRITE returns true if this node has the ATTRIBUTE_WRITE flag.
func (*CallTargetNode) IsIGNORE_VISIBILITY ¶ added in v1.1.0
func (n *CallTargetNode) IsIGNORE_VISIBILITY() bool
IsIGNORE_VISIBILITY returns true if this node has the IGNORE_VISIBILITY flag.
func (*CallTargetNode) IsSAFE_NAVIGATION ¶ added in v1.1.0
func (n *CallTargetNode) IsSAFE_NAVIGATION() bool
IsSAFE_NAVIGATION returns true if this node has the SAFE_NAVIGATION flag.
func (*CallTargetNode) IsVARIABLE_CALL ¶ added in v1.1.0
func (n *CallTargetNode) IsVARIABLE_CALL() bool
IsVARIABLE_CALL returns true if this node has the VARIABLE_CALL flag.
func (*CallTargetNode) ToJSON ¶ added in v1.1.0
func (n *CallTargetNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type CapturePatternNode ¶
type CapturePatternNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Value Node `json:"value"` Target *LocalVariableTargetNode `json:"target"` OperatorLoc Location `json:"operator_loc"` // contains filtered or unexported fields }
Represents assigning to a local variable in pattern matching.
foo => [bar => baz] ^^^^^^^^^^^^
func NewCapturePatternNode ¶
func NewCapturePatternNode(nodeID int, location Location, flags uint32, value Node, target *LocalVariableTargetNode, operator_loc Location) *CapturePatternNode
NewCapturePatternNode creates a new CapturePatternNode.
func (*CapturePatternNode) Accept ¶
func (n *CapturePatternNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*CapturePatternNode) ChildNodes ¶ added in v1.1.0
func (n *CapturePatternNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*CapturePatternNode) CompactChildNodes ¶ added in v1.1.0
func (n *CapturePatternNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*CapturePatternNode) GetLocation ¶ added in v1.1.0
func (n *CapturePatternNode) GetLocation() Location
GetLocation returns the location of this node.
func (*CapturePatternNode) GetNodeID ¶ added in v1.1.0
func (n *CapturePatternNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*CapturePatternNode) ToJSON ¶ added in v1.1.0
func (n *CapturePatternNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type CaseMatchNode ¶
type CaseMatchNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Predicate Node `json:"predicate"` Conditions []Node `json:"conditions"` ElseClause *ElseNode `json:"else_clause"` CaseKeywordLoc Location `json:"case_keyword_loc"` EndKeywordLoc Location `json:"end_keyword_loc"` // contains filtered or unexported fields }
Represents the use of a case statement for pattern matching.
case true in false end ^^^^^^^^^
func NewCaseMatchNode ¶
func NewCaseMatchNode(nodeID int, location Location, flags uint32, predicate Node, conditions []Node, else_clause *ElseNode, case_keyword_loc Location, end_keyword_loc Location) *CaseMatchNode
NewCaseMatchNode creates a new CaseMatchNode.
func (*CaseMatchNode) Accept ¶
func (n *CaseMatchNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*CaseMatchNode) ChildNodes ¶ added in v1.1.0
func (n *CaseMatchNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*CaseMatchNode) CompactChildNodes ¶ added in v1.1.0
func (n *CaseMatchNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*CaseMatchNode) GetLocation ¶ added in v1.1.0
func (n *CaseMatchNode) GetLocation() Location
GetLocation returns the location of this node.
func (*CaseMatchNode) GetNodeID ¶ added in v1.1.0
func (n *CaseMatchNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*CaseMatchNode) ToJSON ¶ added in v1.1.0
func (n *CaseMatchNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type CaseNode ¶
type CaseNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Predicate Node `json:"predicate"` Conditions []Node `json:"conditions"` ElseClause *ElseNode `json:"else_clause"` CaseKeywordLoc Location `json:"case_keyword_loc"` EndKeywordLoc Location `json:"end_keyword_loc"` // contains filtered or unexported fields }
Represents the use of a case statement.
case true when false end ^^^^^^^^^^
func NewCaseNode ¶
func NewCaseNode(nodeID int, location Location, flags uint32, predicate Node, conditions []Node, else_clause *ElseNode, case_keyword_loc Location, end_keyword_loc Location) *CaseNode
NewCaseNode creates a new CaseNode.
func (*CaseNode) ChildNodes ¶ added in v1.1.0
ChildNodes returns all child nodes of the current node.
func (*CaseNode) CompactChildNodes ¶ added in v1.1.0
CompactChildNodes returns all non-nil child nodes.
func (*CaseNode) GetLocation ¶ added in v1.1.0
GetLocation returns the location of this node.
type ClassNode ¶
type ClassNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Locals []string `json:"locals"` ClassKeywordLoc Location `json:"class_keyword_loc"` ConstantPath Node `json:"constant_path"` InheritanceOperatorLoc *Location `json:"inheritance_operator_loc"` Superclass Node `json:"superclass"` Body Node `json:"body"` EndKeywordLoc Location `json:"end_keyword_loc"` Name string `json:"name"` // contains filtered or unexported fields }
Represents a class declaration involving the `class` keyword.
class Foo end ^^^^^^^^^^^^^
func NewClassNode ¶
func NewClassNode(nodeID int, location Location, flags uint32, locals []string, class_keyword_loc Location, constant_path Node, inheritance_operator_loc *Location, superclass Node, body Node, end_keyword_loc Location, name string) *ClassNode
NewClassNode creates a new ClassNode.
func (*ClassNode) ChildNodes ¶ added in v1.1.0
ChildNodes returns all child nodes of the current node.
func (*ClassNode) CompactChildNodes ¶ added in v1.1.0
CompactChildNodes returns all non-nil child nodes.
func (*ClassNode) GetLocation ¶ added in v1.1.0
GetLocation returns the location of this node.
type ClassVariableAndWriteNode ¶
type ClassVariableAndWriteNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Name string `json:"name"` NameLoc Location `json:"name_loc"` OperatorLoc Location `json:"operator_loc"` Value Node `json:"value"` // contains filtered or unexported fields }
Represents the use of the `&&=` operator for assignment to a class variable.
@@target &&= value ^^^^^^^^^^^^^^^^^^
func NewClassVariableAndWriteNode ¶
func NewClassVariableAndWriteNode(nodeID int, location Location, flags uint32, name string, name_loc Location, operator_loc Location, value Node) *ClassVariableAndWriteNode
NewClassVariableAndWriteNode creates a new ClassVariableAndWriteNode.
func (*ClassVariableAndWriteNode) Accept ¶
func (n *ClassVariableAndWriteNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*ClassVariableAndWriteNode) ChildNodes ¶ added in v1.1.0
func (n *ClassVariableAndWriteNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*ClassVariableAndWriteNode) CompactChildNodes ¶ added in v1.1.0
func (n *ClassVariableAndWriteNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*ClassVariableAndWriteNode) GetLocation ¶ added in v1.1.0
func (n *ClassVariableAndWriteNode) GetLocation() Location
GetLocation returns the location of this node.
func (*ClassVariableAndWriteNode) GetNodeID ¶ added in v1.1.0
func (n *ClassVariableAndWriteNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*ClassVariableAndWriteNode) ToJSON ¶ added in v1.1.0
func (n *ClassVariableAndWriteNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type ClassVariableOperatorWriteNode ¶
type ClassVariableOperatorWriteNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Name string `json:"name"` NameLoc Location `json:"name_loc"` BinaryOperatorLoc Location `json:"binary_operator_loc"` Value Node `json:"value"` BinaryOperator string `json:"binary_operator"` // contains filtered or unexported fields }
Represents assigning to a class variable using an operator that isn't `=`.
@@target += value ^^^^^^^^^^^^^^^^^
func NewClassVariableOperatorWriteNode ¶
func NewClassVariableOperatorWriteNode(nodeID int, location Location, flags uint32, name string, name_loc Location, binary_operator_loc Location, value Node, binary_operator string) *ClassVariableOperatorWriteNode
NewClassVariableOperatorWriteNode creates a new ClassVariableOperatorWriteNode.
func (*ClassVariableOperatorWriteNode) Accept ¶
func (n *ClassVariableOperatorWriteNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*ClassVariableOperatorWriteNode) ChildNodes ¶ added in v1.1.0
func (n *ClassVariableOperatorWriteNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*ClassVariableOperatorWriteNode) CompactChildNodes ¶ added in v1.1.0
func (n *ClassVariableOperatorWriteNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*ClassVariableOperatorWriteNode) GetLocation ¶ added in v1.1.0
func (n *ClassVariableOperatorWriteNode) GetLocation() Location
GetLocation returns the location of this node.
func (*ClassVariableOperatorWriteNode) GetNodeID ¶ added in v1.1.0
func (n *ClassVariableOperatorWriteNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*ClassVariableOperatorWriteNode) ToJSON ¶ added in v1.1.0
func (n *ClassVariableOperatorWriteNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type ClassVariableOrWriteNode ¶
type ClassVariableOrWriteNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Name string `json:"name"` NameLoc Location `json:"name_loc"` OperatorLoc Location `json:"operator_loc"` Value Node `json:"value"` // contains filtered or unexported fields }
Represents the use of the `||=` operator for assignment to a class variable.
@@target ||= value ^^^^^^^^^^^^^^^^^^
func NewClassVariableOrWriteNode ¶
func NewClassVariableOrWriteNode(nodeID int, location Location, flags uint32, name string, name_loc Location, operator_loc Location, value Node) *ClassVariableOrWriteNode
NewClassVariableOrWriteNode creates a new ClassVariableOrWriteNode.
func (*ClassVariableOrWriteNode) Accept ¶
func (n *ClassVariableOrWriteNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*ClassVariableOrWriteNode) ChildNodes ¶ added in v1.1.0
func (n *ClassVariableOrWriteNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*ClassVariableOrWriteNode) CompactChildNodes ¶ added in v1.1.0
func (n *ClassVariableOrWriteNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*ClassVariableOrWriteNode) GetLocation ¶ added in v1.1.0
func (n *ClassVariableOrWriteNode) GetLocation() Location
GetLocation returns the location of this node.
func (*ClassVariableOrWriteNode) GetNodeID ¶ added in v1.1.0
func (n *ClassVariableOrWriteNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*ClassVariableOrWriteNode) ToJSON ¶ added in v1.1.0
func (n *ClassVariableOrWriteNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type ClassVariableReadNode ¶
type ClassVariableReadNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Name string `json:"name"` // contains filtered or unexported fields }
Represents referencing a class variable.
@@foo ^^^^^
func NewClassVariableReadNode ¶
func NewClassVariableReadNode(nodeID int, location Location, flags uint32, name string) *ClassVariableReadNode
NewClassVariableReadNode creates a new ClassVariableReadNode.
func (*ClassVariableReadNode) Accept ¶
func (n *ClassVariableReadNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*ClassVariableReadNode) ChildNodes ¶ added in v1.1.0
func (n *ClassVariableReadNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*ClassVariableReadNode) CompactChildNodes ¶ added in v1.1.0
func (n *ClassVariableReadNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*ClassVariableReadNode) GetLocation ¶ added in v1.1.0
func (n *ClassVariableReadNode) GetLocation() Location
GetLocation returns the location of this node.
func (*ClassVariableReadNode) GetNodeID ¶ added in v1.1.0
func (n *ClassVariableReadNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*ClassVariableReadNode) ToJSON ¶ added in v1.1.0
func (n *ClassVariableReadNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type ClassVariableTargetNode ¶
type ClassVariableTargetNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Name string `json:"name"` // contains filtered or unexported fields }
Represents writing to a class variable in a context that doesn't have an explicit value.
@@foo, @@bar = baz ^^^^^ ^^^^^
func NewClassVariableTargetNode ¶
func NewClassVariableTargetNode(nodeID int, location Location, flags uint32, name string) *ClassVariableTargetNode
NewClassVariableTargetNode creates a new ClassVariableTargetNode.
func (*ClassVariableTargetNode) Accept ¶
func (n *ClassVariableTargetNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*ClassVariableTargetNode) ChildNodes ¶ added in v1.1.0
func (n *ClassVariableTargetNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*ClassVariableTargetNode) CompactChildNodes ¶ added in v1.1.0
func (n *ClassVariableTargetNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*ClassVariableTargetNode) GetLocation ¶ added in v1.1.0
func (n *ClassVariableTargetNode) GetLocation() Location
GetLocation returns the location of this node.
func (*ClassVariableTargetNode) GetNodeID ¶ added in v1.1.0
func (n *ClassVariableTargetNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*ClassVariableTargetNode) ToJSON ¶ added in v1.1.0
func (n *ClassVariableTargetNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type ClassVariableWriteNode ¶
type ClassVariableWriteNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Name string `json:"name"` NameLoc Location `json:"name_loc"` Value Node `json:"value"` OperatorLoc Location `json:"operator_loc"` // contains filtered or unexported fields }
Represents writing to a class variable.
@@foo = 1 ^^^^^^^^^
func NewClassVariableWriteNode ¶
func NewClassVariableWriteNode(nodeID int, location Location, flags uint32, name string, name_loc Location, value Node, operator_loc Location) *ClassVariableWriteNode
NewClassVariableWriteNode creates a new ClassVariableWriteNode.
func (*ClassVariableWriteNode) Accept ¶
func (n *ClassVariableWriteNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*ClassVariableWriteNode) ChildNodes ¶ added in v1.1.0
func (n *ClassVariableWriteNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*ClassVariableWriteNode) CompactChildNodes ¶ added in v1.1.0
func (n *ClassVariableWriteNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*ClassVariableWriteNode) GetLocation ¶ added in v1.1.0
func (n *ClassVariableWriteNode) GetLocation() Location
GetLocation returns the location of this node.
func (*ClassVariableWriteNode) GetNodeID ¶ added in v1.1.0
func (n *ClassVariableWriteNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*ClassVariableWriteNode) ToJSON ¶ added in v1.1.0
func (n *ClassVariableWriteNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type CommandLine ¶ added in v1.1.0
type CommandLine int
const ( CommandA CommandLine = iota CommandE CommandL CommandN CommandP CommandX )
type ConstantAndWriteNode ¶
type ConstantAndWriteNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Name string `json:"name"` NameLoc Location `json:"name_loc"` OperatorLoc Location `json:"operator_loc"` Value Node `json:"value"` // contains filtered or unexported fields }
Represents the use of the `&&=` operator for assignment to a constant.
Target &&= value ^^^^^^^^^^^^^^^^
func NewConstantAndWriteNode ¶
func NewConstantAndWriteNode(nodeID int, location Location, flags uint32, name string, name_loc Location, operator_loc Location, value Node) *ConstantAndWriteNode
NewConstantAndWriteNode creates a new ConstantAndWriteNode.
func (*ConstantAndWriteNode) Accept ¶
func (n *ConstantAndWriteNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*ConstantAndWriteNode) ChildNodes ¶ added in v1.1.0
func (n *ConstantAndWriteNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*ConstantAndWriteNode) CompactChildNodes ¶ added in v1.1.0
func (n *ConstantAndWriteNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*ConstantAndWriteNode) GetLocation ¶ added in v1.1.0
func (n *ConstantAndWriteNode) GetLocation() Location
GetLocation returns the location of this node.
func (*ConstantAndWriteNode) GetNodeID ¶ added in v1.1.0
func (n *ConstantAndWriteNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*ConstantAndWriteNode) ToJSON ¶ added in v1.1.0
func (n *ConstantAndWriteNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type ConstantOperatorWriteNode ¶
type ConstantOperatorWriteNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Name string `json:"name"` NameLoc Location `json:"name_loc"` BinaryOperatorLoc Location `json:"binary_operator_loc"` Value Node `json:"value"` BinaryOperator string `json:"binary_operator"` // contains filtered or unexported fields }
Represents assigning to a constant using an operator that isn't `=`.
Target += value ^^^^^^^^^^^^^^^
func NewConstantOperatorWriteNode ¶
func NewConstantOperatorWriteNode(nodeID int, location Location, flags uint32, name string, name_loc Location, binary_operator_loc Location, value Node, binary_operator string) *ConstantOperatorWriteNode
NewConstantOperatorWriteNode creates a new ConstantOperatorWriteNode.
func (*ConstantOperatorWriteNode) Accept ¶
func (n *ConstantOperatorWriteNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*ConstantOperatorWriteNode) ChildNodes ¶ added in v1.1.0
func (n *ConstantOperatorWriteNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*ConstantOperatorWriteNode) CompactChildNodes ¶ added in v1.1.0
func (n *ConstantOperatorWriteNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*ConstantOperatorWriteNode) GetLocation ¶ added in v1.1.0
func (n *ConstantOperatorWriteNode) GetLocation() Location
GetLocation returns the location of this node.
func (*ConstantOperatorWriteNode) GetNodeID ¶ added in v1.1.0
func (n *ConstantOperatorWriteNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*ConstantOperatorWriteNode) ToJSON ¶ added in v1.1.0
func (n *ConstantOperatorWriteNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type ConstantOrWriteNode ¶
type ConstantOrWriteNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Name string `json:"name"` NameLoc Location `json:"name_loc"` OperatorLoc Location `json:"operator_loc"` Value Node `json:"value"` // contains filtered or unexported fields }
Represents the use of the `||=` operator for assignment to a constant.
Target ||= value ^^^^^^^^^^^^^^^^
func NewConstantOrWriteNode ¶
func NewConstantOrWriteNode(nodeID int, location Location, flags uint32, name string, name_loc Location, operator_loc Location, value Node) *ConstantOrWriteNode
NewConstantOrWriteNode creates a new ConstantOrWriteNode.
func (*ConstantOrWriteNode) Accept ¶
func (n *ConstantOrWriteNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*ConstantOrWriteNode) ChildNodes ¶ added in v1.1.0
func (n *ConstantOrWriteNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*ConstantOrWriteNode) CompactChildNodes ¶ added in v1.1.0
func (n *ConstantOrWriteNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*ConstantOrWriteNode) GetLocation ¶ added in v1.1.0
func (n *ConstantOrWriteNode) GetLocation() Location
GetLocation returns the location of this node.
func (*ConstantOrWriteNode) GetNodeID ¶ added in v1.1.0
func (n *ConstantOrWriteNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*ConstantOrWriteNode) ToJSON ¶ added in v1.1.0
func (n *ConstantOrWriteNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type ConstantPathAndWriteNode ¶
type ConstantPathAndWriteNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Target *ConstantPathNode `json:"target"` OperatorLoc Location `json:"operator_loc"` Value Node `json:"value"` // contains filtered or unexported fields }
Represents the use of the `&&=` operator for assignment to a constant path.
Parent::Child &&= value ^^^^^^^^^^^^^^^^^^^^^^^
func NewConstantPathAndWriteNode ¶
func NewConstantPathAndWriteNode(nodeID int, location Location, flags uint32, target *ConstantPathNode, operator_loc Location, value Node) *ConstantPathAndWriteNode
NewConstantPathAndWriteNode creates a new ConstantPathAndWriteNode.
func (*ConstantPathAndWriteNode) Accept ¶
func (n *ConstantPathAndWriteNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*ConstantPathAndWriteNode) ChildNodes ¶ added in v1.1.0
func (n *ConstantPathAndWriteNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*ConstantPathAndWriteNode) CompactChildNodes ¶ added in v1.1.0
func (n *ConstantPathAndWriteNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*ConstantPathAndWriteNode) GetLocation ¶ added in v1.1.0
func (n *ConstantPathAndWriteNode) GetLocation() Location
GetLocation returns the location of this node.
func (*ConstantPathAndWriteNode) GetNodeID ¶ added in v1.1.0
func (n *ConstantPathAndWriteNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*ConstantPathAndWriteNode) ToJSON ¶ added in v1.1.0
func (n *ConstantPathAndWriteNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type ConstantPathNode ¶
type ConstantPathNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Parent Node `json:"parent"` Name *string `json:"name"` DelimiterLoc Location `json:"delimiter_loc"` NameLoc Location `json:"name_loc"` // contains filtered or unexported fields }
Represents accessing a constant through a path of `::` operators.
Foo::Bar ^^^^^^^^
func NewConstantPathNode ¶
func NewConstantPathNode(nodeID int, location Location, flags uint32, parent Node, name *string, delimiter_loc Location, name_loc Location) *ConstantPathNode
NewConstantPathNode creates a new ConstantPathNode.
func (*ConstantPathNode) Accept ¶
func (n *ConstantPathNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*ConstantPathNode) ChildNodes ¶ added in v1.1.0
func (n *ConstantPathNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*ConstantPathNode) CompactChildNodes ¶ added in v1.1.0
func (n *ConstantPathNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*ConstantPathNode) GetLocation ¶ added in v1.1.0
func (n *ConstantPathNode) GetLocation() Location
GetLocation returns the location of this node.
func (*ConstantPathNode) GetNodeID ¶ added in v1.1.0
func (n *ConstantPathNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*ConstantPathNode) ToJSON ¶ added in v1.1.0
func (n *ConstantPathNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type ConstantPathOperatorWriteNode ¶
type ConstantPathOperatorWriteNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Target *ConstantPathNode `json:"target"` BinaryOperatorLoc Location `json:"binary_operator_loc"` Value Node `json:"value"` BinaryOperator string `json:"binary_operator"` // contains filtered or unexported fields }
Represents assigning to a constant path using an operator that isn't `=`.
Parent::Child += value ^^^^^^^^^^^^^^^^^^^^^^
func NewConstantPathOperatorWriteNode ¶
func NewConstantPathOperatorWriteNode(nodeID int, location Location, flags uint32, target *ConstantPathNode, binary_operator_loc Location, value Node, binary_operator string) *ConstantPathOperatorWriteNode
NewConstantPathOperatorWriteNode creates a new ConstantPathOperatorWriteNode.
func (*ConstantPathOperatorWriteNode) Accept ¶
func (n *ConstantPathOperatorWriteNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*ConstantPathOperatorWriteNode) ChildNodes ¶ added in v1.1.0
func (n *ConstantPathOperatorWriteNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*ConstantPathOperatorWriteNode) CompactChildNodes ¶ added in v1.1.0
func (n *ConstantPathOperatorWriteNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*ConstantPathOperatorWriteNode) GetLocation ¶ added in v1.1.0
func (n *ConstantPathOperatorWriteNode) GetLocation() Location
GetLocation returns the location of this node.
func (*ConstantPathOperatorWriteNode) GetNodeID ¶ added in v1.1.0
func (n *ConstantPathOperatorWriteNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*ConstantPathOperatorWriteNode) ToJSON ¶ added in v1.1.0
func (n *ConstantPathOperatorWriteNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type ConstantPathOrWriteNode ¶
type ConstantPathOrWriteNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Target *ConstantPathNode `json:"target"` OperatorLoc Location `json:"operator_loc"` Value Node `json:"value"` // contains filtered or unexported fields }
Represents the use of the `||=` operator for assignment to a constant path.
Parent::Child ||= value ^^^^^^^^^^^^^^^^^^^^^^^
func NewConstantPathOrWriteNode ¶
func NewConstantPathOrWriteNode(nodeID int, location Location, flags uint32, target *ConstantPathNode, operator_loc Location, value Node) *ConstantPathOrWriteNode
NewConstantPathOrWriteNode creates a new ConstantPathOrWriteNode.
func (*ConstantPathOrWriteNode) Accept ¶
func (n *ConstantPathOrWriteNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*ConstantPathOrWriteNode) ChildNodes ¶ added in v1.1.0
func (n *ConstantPathOrWriteNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*ConstantPathOrWriteNode) CompactChildNodes ¶ added in v1.1.0
func (n *ConstantPathOrWriteNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*ConstantPathOrWriteNode) GetLocation ¶ added in v1.1.0
func (n *ConstantPathOrWriteNode) GetLocation() Location
GetLocation returns the location of this node.
func (*ConstantPathOrWriteNode) GetNodeID ¶ added in v1.1.0
func (n *ConstantPathOrWriteNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*ConstantPathOrWriteNode) ToJSON ¶ added in v1.1.0
func (n *ConstantPathOrWriteNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type ConstantPathTargetNode ¶
type ConstantPathTargetNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Parent Node `json:"parent"` Name *string `json:"name"` DelimiterLoc Location `json:"delimiter_loc"` NameLoc Location `json:"name_loc"` // contains filtered or unexported fields }
Represents writing to a constant path in a context that doesn't have an explicit value.
Foo::Foo, Bar::Bar = baz ^^^^^^^^ ^^^^^^^^
func NewConstantPathTargetNode ¶
func NewConstantPathTargetNode(nodeID int, location Location, flags uint32, parent Node, name *string, delimiter_loc Location, name_loc Location) *ConstantPathTargetNode
NewConstantPathTargetNode creates a new ConstantPathTargetNode.
func (*ConstantPathTargetNode) Accept ¶
func (n *ConstantPathTargetNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*ConstantPathTargetNode) ChildNodes ¶ added in v1.1.0
func (n *ConstantPathTargetNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*ConstantPathTargetNode) CompactChildNodes ¶ added in v1.1.0
func (n *ConstantPathTargetNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*ConstantPathTargetNode) GetLocation ¶ added in v1.1.0
func (n *ConstantPathTargetNode) GetLocation() Location
GetLocation returns the location of this node.
func (*ConstantPathTargetNode) GetNodeID ¶ added in v1.1.0
func (n *ConstantPathTargetNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*ConstantPathTargetNode) ToJSON ¶ added in v1.1.0
func (n *ConstantPathTargetNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type ConstantPathWriteNode ¶
type ConstantPathWriteNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Target *ConstantPathNode `json:"target"` OperatorLoc Location `json:"operator_loc"` Value Node `json:"value"` // contains filtered or unexported fields }
Represents writing to a constant path.
::Foo = 1 ^^^^^^^^^ Foo::Bar = 1 ^^^^^^^^^^^^ ::Foo::Bar = 1 ^^^^^^^^^^^^^^
func NewConstantPathWriteNode ¶
func NewConstantPathWriteNode(nodeID int, location Location, flags uint32, target *ConstantPathNode, operator_loc Location, value Node) *ConstantPathWriteNode
NewConstantPathWriteNode creates a new ConstantPathWriteNode.
func (*ConstantPathWriteNode) Accept ¶
func (n *ConstantPathWriteNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*ConstantPathWriteNode) ChildNodes ¶ added in v1.1.0
func (n *ConstantPathWriteNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*ConstantPathWriteNode) CompactChildNodes ¶ added in v1.1.0
func (n *ConstantPathWriteNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*ConstantPathWriteNode) GetLocation ¶ added in v1.1.0
func (n *ConstantPathWriteNode) GetLocation() Location
GetLocation returns the location of this node.
func (*ConstantPathWriteNode) GetNodeID ¶ added in v1.1.0
func (n *ConstantPathWriteNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*ConstantPathWriteNode) ToJSON ¶ added in v1.1.0
func (n *ConstantPathWriteNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type ConstantReadNode ¶
type ConstantReadNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Name string `json:"name"` // contains filtered or unexported fields }
Represents referencing a constant.
Foo ^^^
func NewConstantReadNode ¶
func NewConstantReadNode(nodeID int, location Location, flags uint32, name string) *ConstantReadNode
NewConstantReadNode creates a new ConstantReadNode.
func (*ConstantReadNode) Accept ¶
func (n *ConstantReadNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*ConstantReadNode) ChildNodes ¶ added in v1.1.0
func (n *ConstantReadNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*ConstantReadNode) CompactChildNodes ¶ added in v1.1.0
func (n *ConstantReadNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*ConstantReadNode) GetLocation ¶ added in v1.1.0
func (n *ConstantReadNode) GetLocation() Location
GetLocation returns the location of this node.
func (*ConstantReadNode) GetNodeID ¶ added in v1.1.0
func (n *ConstantReadNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*ConstantReadNode) ToJSON ¶ added in v1.1.0
func (n *ConstantReadNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type ConstantTargetNode ¶
type ConstantTargetNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Name string `json:"name"` // contains filtered or unexported fields }
Represents writing to a constant in a context that doesn't have an explicit value.
Foo, Bar = baz ^^^ ^^^
func NewConstantTargetNode ¶
func NewConstantTargetNode(nodeID int, location Location, flags uint32, name string) *ConstantTargetNode
NewConstantTargetNode creates a new ConstantTargetNode.
func (*ConstantTargetNode) Accept ¶
func (n *ConstantTargetNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*ConstantTargetNode) ChildNodes ¶ added in v1.1.0
func (n *ConstantTargetNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*ConstantTargetNode) CompactChildNodes ¶ added in v1.1.0
func (n *ConstantTargetNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*ConstantTargetNode) GetLocation ¶ added in v1.1.0
func (n *ConstantTargetNode) GetLocation() Location
GetLocation returns the location of this node.
func (*ConstantTargetNode) GetNodeID ¶ added in v1.1.0
func (n *ConstantTargetNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*ConstantTargetNode) ToJSON ¶ added in v1.1.0
func (n *ConstantTargetNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type ConstantWriteNode ¶
type ConstantWriteNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Name string `json:"name"` NameLoc Location `json:"name_loc"` Value Node `json:"value"` OperatorLoc Location `json:"operator_loc"` // contains filtered or unexported fields }
Represents writing to a constant.
Foo = 1 ^^^^^^^
func NewConstantWriteNode ¶
func NewConstantWriteNode(nodeID int, location Location, flags uint32, name string, name_loc Location, value Node, operator_loc Location) *ConstantWriteNode
NewConstantWriteNode creates a new ConstantWriteNode.
func (*ConstantWriteNode) Accept ¶
func (n *ConstantWriteNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*ConstantWriteNode) ChildNodes ¶ added in v1.1.0
func (n *ConstantWriteNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*ConstantWriteNode) CompactChildNodes ¶ added in v1.1.0
func (n *ConstantWriteNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*ConstantWriteNode) GetLocation ¶ added in v1.1.0
func (n *ConstantWriteNode) GetLocation() Location
GetLocation returns the location of this node.
func (*ConstantWriteNode) GetNodeID ¶ added in v1.1.0
func (n *ConstantWriteNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*ConstantWriteNode) ToJSON ¶ added in v1.1.0
func (n *ConstantWriteNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type DefNode ¶
type DefNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Name string `json:"name"` NameLoc Location `json:"name_loc"` Receiver Node `json:"receiver"` Parameters *ParametersNode `json:"parameters"` Body Node `json:"body"` Locals []string `json:"locals"` DefKeywordLoc Location `json:"def_keyword_loc"` OperatorLoc *Location `json:"operator_loc"` LparenLoc *Location `json:"lparen_loc"` RparenLoc *Location `json:"rparen_loc"` EqualLoc *Location `json:"equal_loc"` EndKeywordLoc *Location `json:"end_keyword_loc"` // contains filtered or unexported fields }
Represents a method definition.
def method end ^^^^^^^^^^
func NewDefNode ¶
func NewDefNode(nodeID int, location Location, flags uint32, name string, name_loc Location, receiver Node, parameters *ParametersNode, body Node, locals []string, def_keyword_loc Location, operator_loc *Location, lparen_loc *Location, rparen_loc *Location, equal_loc *Location, end_keyword_loc *Location) *DefNode
NewDefNode creates a new DefNode.
func (*DefNode) ChildNodes ¶ added in v1.1.0
ChildNodes returns all child nodes of the current node.
func (*DefNode) CompactChildNodes ¶ added in v1.1.0
CompactChildNodes returns all non-nil child nodes.
func (*DefNode) GetLocation ¶ added in v1.1.0
GetLocation returns the location of this node.
type DefaultLogger ¶ added in v1.1.0
type DefaultLogger struct {
Logger
}
func NewDefaultLogger ¶ added in v1.1.0
func NewDefaultLogger() *DefaultLogger
func (*DefaultLogger) Debug ¶ added in v1.1.0
func (l *DefaultLogger) Debug(message string, args ...any)
type DefaultVisitor ¶ added in v1.1.0
type DefaultVisitor struct{}
DefaultVisitor provides a default implementation of the Visitor interface that simply continues walking the tree by visiting child nodes.
func (*DefaultVisitor) Visit ¶ added in v1.1.0
func (v *DefaultVisitor) Visit(node Node)
Visit calls Accept on the given node if it is not nil.
func (*DefaultVisitor) VisitAliasGlobalVariableNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitAliasGlobalVariableNode(node *AliasGlobalVariableNode)
VisitAliasGlobalVariableNode visits a AliasGlobalVariableNode node.
func (*DefaultVisitor) VisitAliasMethodNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitAliasMethodNode(node *AliasMethodNode)
VisitAliasMethodNode visits a AliasMethodNode node.
func (*DefaultVisitor) VisitAll ¶ added in v1.1.0
func (v *DefaultVisitor) VisitAll(nodes []Node)
VisitAll visits each node in the slice by calling Accept on each one.
func (*DefaultVisitor) VisitAlternationPatternNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitAlternationPatternNode(node *AlternationPatternNode)
VisitAlternationPatternNode visits a AlternationPatternNode node.
func (*DefaultVisitor) VisitAndNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitAndNode(node *AndNode)
VisitAndNode visits a AndNode node.
func (*DefaultVisitor) VisitArgumentsNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitArgumentsNode(node *ArgumentsNode)
VisitArgumentsNode visits a ArgumentsNode node.
func (*DefaultVisitor) VisitArrayNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitArrayNode(node *ArrayNode)
VisitArrayNode visits a ArrayNode node.
func (*DefaultVisitor) VisitArrayPatternNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitArrayPatternNode(node *ArrayPatternNode)
VisitArrayPatternNode visits a ArrayPatternNode node.
func (*DefaultVisitor) VisitAssocNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitAssocNode(node *AssocNode)
VisitAssocNode visits a AssocNode node.
func (*DefaultVisitor) VisitAssocSplatNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitAssocSplatNode(node *AssocSplatNode)
VisitAssocSplatNode visits a AssocSplatNode node.
func (*DefaultVisitor) VisitBackReferenceReadNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitBackReferenceReadNode(node *BackReferenceReadNode)
VisitBackReferenceReadNode visits a BackReferenceReadNode node.
func (*DefaultVisitor) VisitBeginNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitBeginNode(node *BeginNode)
VisitBeginNode visits a BeginNode node.
func (*DefaultVisitor) VisitBlockArgumentNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitBlockArgumentNode(node *BlockArgumentNode)
VisitBlockArgumentNode visits a BlockArgumentNode node.
func (*DefaultVisitor) VisitBlockLocalVariableNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitBlockLocalVariableNode(node *BlockLocalVariableNode)
VisitBlockLocalVariableNode visits a BlockLocalVariableNode node.
func (*DefaultVisitor) VisitBlockNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitBlockNode(node *BlockNode)
VisitBlockNode visits a BlockNode node.
func (*DefaultVisitor) VisitBlockParameterNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitBlockParameterNode(node *BlockParameterNode)
VisitBlockParameterNode visits a BlockParameterNode node.
func (*DefaultVisitor) VisitBlockParametersNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitBlockParametersNode(node *BlockParametersNode)
VisitBlockParametersNode visits a BlockParametersNode node.
func (*DefaultVisitor) VisitBreakNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitBreakNode(node *BreakNode)
VisitBreakNode visits a BreakNode node.
func (*DefaultVisitor) VisitCallAndWriteNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitCallAndWriteNode(node *CallAndWriteNode)
VisitCallAndWriteNode visits a CallAndWriteNode node.
func (*DefaultVisitor) VisitCallNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitCallNode(node *CallNode)
VisitCallNode visits a CallNode node.
func (*DefaultVisitor) VisitCallOperatorWriteNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitCallOperatorWriteNode(node *CallOperatorWriteNode)
VisitCallOperatorWriteNode visits a CallOperatorWriteNode node.
func (*DefaultVisitor) VisitCallOrWriteNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitCallOrWriteNode(node *CallOrWriteNode)
VisitCallOrWriteNode visits a CallOrWriteNode node.
func (*DefaultVisitor) VisitCallTargetNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitCallTargetNode(node *CallTargetNode)
VisitCallTargetNode visits a CallTargetNode node.
func (*DefaultVisitor) VisitCapturePatternNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitCapturePatternNode(node *CapturePatternNode)
VisitCapturePatternNode visits a CapturePatternNode node.
func (*DefaultVisitor) VisitCaseMatchNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitCaseMatchNode(node *CaseMatchNode)
VisitCaseMatchNode visits a CaseMatchNode node.
func (*DefaultVisitor) VisitCaseNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitCaseNode(node *CaseNode)
VisitCaseNode visits a CaseNode node.
func (*DefaultVisitor) VisitChildNodes ¶ added in v1.1.0
func (v *DefaultVisitor) VisitChildNodes(node Node)
VisitChildNodes visits the child nodes of the given node by calling Accept on each one.
func (*DefaultVisitor) VisitClassNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitClassNode(node *ClassNode)
VisitClassNode visits a ClassNode node.
func (*DefaultVisitor) VisitClassVariableAndWriteNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitClassVariableAndWriteNode(node *ClassVariableAndWriteNode)
VisitClassVariableAndWriteNode visits a ClassVariableAndWriteNode node.
func (*DefaultVisitor) VisitClassVariableOperatorWriteNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitClassVariableOperatorWriteNode(node *ClassVariableOperatorWriteNode)
VisitClassVariableOperatorWriteNode visits a ClassVariableOperatorWriteNode node.
func (*DefaultVisitor) VisitClassVariableOrWriteNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitClassVariableOrWriteNode(node *ClassVariableOrWriteNode)
VisitClassVariableOrWriteNode visits a ClassVariableOrWriteNode node.
func (*DefaultVisitor) VisitClassVariableReadNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitClassVariableReadNode(node *ClassVariableReadNode)
VisitClassVariableReadNode visits a ClassVariableReadNode node.
func (*DefaultVisitor) VisitClassVariableTargetNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitClassVariableTargetNode(node *ClassVariableTargetNode)
VisitClassVariableTargetNode visits a ClassVariableTargetNode node.
func (*DefaultVisitor) VisitClassVariableWriteNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitClassVariableWriteNode(node *ClassVariableWriteNode)
VisitClassVariableWriteNode visits a ClassVariableWriteNode node.
func (*DefaultVisitor) VisitConstantAndWriteNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitConstantAndWriteNode(node *ConstantAndWriteNode)
VisitConstantAndWriteNode visits a ConstantAndWriteNode node.
func (*DefaultVisitor) VisitConstantOperatorWriteNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitConstantOperatorWriteNode(node *ConstantOperatorWriteNode)
VisitConstantOperatorWriteNode visits a ConstantOperatorWriteNode node.
func (*DefaultVisitor) VisitConstantOrWriteNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitConstantOrWriteNode(node *ConstantOrWriteNode)
VisitConstantOrWriteNode visits a ConstantOrWriteNode node.
func (*DefaultVisitor) VisitConstantPathAndWriteNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitConstantPathAndWriteNode(node *ConstantPathAndWriteNode)
VisitConstantPathAndWriteNode visits a ConstantPathAndWriteNode node.
func (*DefaultVisitor) VisitConstantPathNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitConstantPathNode(node *ConstantPathNode)
VisitConstantPathNode visits a ConstantPathNode node.
func (*DefaultVisitor) VisitConstantPathOperatorWriteNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitConstantPathOperatorWriteNode(node *ConstantPathOperatorWriteNode)
VisitConstantPathOperatorWriteNode visits a ConstantPathOperatorWriteNode node.
func (*DefaultVisitor) VisitConstantPathOrWriteNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitConstantPathOrWriteNode(node *ConstantPathOrWriteNode)
VisitConstantPathOrWriteNode visits a ConstantPathOrWriteNode node.
func (*DefaultVisitor) VisitConstantPathTargetNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitConstantPathTargetNode(node *ConstantPathTargetNode)
VisitConstantPathTargetNode visits a ConstantPathTargetNode node.
func (*DefaultVisitor) VisitConstantPathWriteNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitConstantPathWriteNode(node *ConstantPathWriteNode)
VisitConstantPathWriteNode visits a ConstantPathWriteNode node.
func (*DefaultVisitor) VisitConstantReadNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitConstantReadNode(node *ConstantReadNode)
VisitConstantReadNode visits a ConstantReadNode node.
func (*DefaultVisitor) VisitConstantTargetNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitConstantTargetNode(node *ConstantTargetNode)
VisitConstantTargetNode visits a ConstantTargetNode node.
func (*DefaultVisitor) VisitConstantWriteNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitConstantWriteNode(node *ConstantWriteNode)
VisitConstantWriteNode visits a ConstantWriteNode node.
func (*DefaultVisitor) VisitDefNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitDefNode(node *DefNode)
VisitDefNode visits a DefNode node.
func (*DefaultVisitor) VisitDefinedNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitDefinedNode(node *DefinedNode)
VisitDefinedNode visits a DefinedNode node.
func (*DefaultVisitor) VisitElseNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitElseNode(node *ElseNode)
VisitElseNode visits a ElseNode node.
func (*DefaultVisitor) VisitEmbeddedStatementsNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitEmbeddedStatementsNode(node *EmbeddedStatementsNode)
VisitEmbeddedStatementsNode visits a EmbeddedStatementsNode node.
func (*DefaultVisitor) VisitEmbeddedVariableNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitEmbeddedVariableNode(node *EmbeddedVariableNode)
VisitEmbeddedVariableNode visits a EmbeddedVariableNode node.
func (*DefaultVisitor) VisitEnsureNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitEnsureNode(node *EnsureNode)
VisitEnsureNode visits a EnsureNode node.
func (*DefaultVisitor) VisitFalseNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitFalseNode(node *FalseNode)
VisitFalseNode visits a FalseNode node.
func (*DefaultVisitor) VisitFindPatternNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitFindPatternNode(node *FindPatternNode)
VisitFindPatternNode visits a FindPatternNode node.
func (*DefaultVisitor) VisitFlipFlopNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitFlipFlopNode(node *FlipFlopNode)
VisitFlipFlopNode visits a FlipFlopNode node.
func (*DefaultVisitor) VisitFloatNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitFloatNode(node *FloatNode)
VisitFloatNode visits a FloatNode node.
func (*DefaultVisitor) VisitForNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitForNode(node *ForNode)
VisitForNode visits a ForNode node.
func (*DefaultVisitor) VisitForwardingArgumentsNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitForwardingArgumentsNode(node *ForwardingArgumentsNode)
VisitForwardingArgumentsNode visits a ForwardingArgumentsNode node.
func (*DefaultVisitor) VisitForwardingParameterNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitForwardingParameterNode(node *ForwardingParameterNode)
VisitForwardingParameterNode visits a ForwardingParameterNode node.
func (*DefaultVisitor) VisitForwardingSuperNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitForwardingSuperNode(node *ForwardingSuperNode)
VisitForwardingSuperNode visits a ForwardingSuperNode node.
func (*DefaultVisitor) VisitGlobalVariableAndWriteNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitGlobalVariableAndWriteNode(node *GlobalVariableAndWriteNode)
VisitGlobalVariableAndWriteNode visits a GlobalVariableAndWriteNode node.
func (*DefaultVisitor) VisitGlobalVariableOperatorWriteNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitGlobalVariableOperatorWriteNode(node *GlobalVariableOperatorWriteNode)
VisitGlobalVariableOperatorWriteNode visits a GlobalVariableOperatorWriteNode node.
func (*DefaultVisitor) VisitGlobalVariableOrWriteNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitGlobalVariableOrWriteNode(node *GlobalVariableOrWriteNode)
VisitGlobalVariableOrWriteNode visits a GlobalVariableOrWriteNode node.
func (*DefaultVisitor) VisitGlobalVariableReadNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitGlobalVariableReadNode(node *GlobalVariableReadNode)
VisitGlobalVariableReadNode visits a GlobalVariableReadNode node.
func (*DefaultVisitor) VisitGlobalVariableTargetNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitGlobalVariableTargetNode(node *GlobalVariableTargetNode)
VisitGlobalVariableTargetNode visits a GlobalVariableTargetNode node.
func (*DefaultVisitor) VisitGlobalVariableWriteNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitGlobalVariableWriteNode(node *GlobalVariableWriteNode)
VisitGlobalVariableWriteNode visits a GlobalVariableWriteNode node.
func (*DefaultVisitor) VisitHashNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitHashNode(node *HashNode)
VisitHashNode visits a HashNode node.
func (*DefaultVisitor) VisitHashPatternNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitHashPatternNode(node *HashPatternNode)
VisitHashPatternNode visits a HashPatternNode node.
func (*DefaultVisitor) VisitIfNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitIfNode(node *IfNode)
VisitIfNode visits a IfNode node.
func (*DefaultVisitor) VisitImaginaryNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitImaginaryNode(node *ImaginaryNode)
VisitImaginaryNode visits a ImaginaryNode node.
func (*DefaultVisitor) VisitImplicitNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitImplicitNode(node *ImplicitNode)
VisitImplicitNode visits a ImplicitNode node.
func (*DefaultVisitor) VisitImplicitRestNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitImplicitRestNode(node *ImplicitRestNode)
VisitImplicitRestNode visits a ImplicitRestNode node.
func (*DefaultVisitor) VisitInNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitInNode(node *InNode)
VisitInNode visits a InNode node.
func (*DefaultVisitor) VisitIndexAndWriteNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitIndexAndWriteNode(node *IndexAndWriteNode)
VisitIndexAndWriteNode visits a IndexAndWriteNode node.
func (*DefaultVisitor) VisitIndexOperatorWriteNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitIndexOperatorWriteNode(node *IndexOperatorWriteNode)
VisitIndexOperatorWriteNode visits a IndexOperatorWriteNode node.
func (*DefaultVisitor) VisitIndexOrWriteNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitIndexOrWriteNode(node *IndexOrWriteNode)
VisitIndexOrWriteNode visits a IndexOrWriteNode node.
func (*DefaultVisitor) VisitIndexTargetNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitIndexTargetNode(node *IndexTargetNode)
VisitIndexTargetNode visits a IndexTargetNode node.
func (*DefaultVisitor) VisitInstanceVariableAndWriteNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitInstanceVariableAndWriteNode(node *InstanceVariableAndWriteNode)
VisitInstanceVariableAndWriteNode visits a InstanceVariableAndWriteNode node.
func (*DefaultVisitor) VisitInstanceVariableOperatorWriteNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitInstanceVariableOperatorWriteNode(node *InstanceVariableOperatorWriteNode)
VisitInstanceVariableOperatorWriteNode visits a InstanceVariableOperatorWriteNode node.
func (*DefaultVisitor) VisitInstanceVariableOrWriteNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitInstanceVariableOrWriteNode(node *InstanceVariableOrWriteNode)
VisitInstanceVariableOrWriteNode visits a InstanceVariableOrWriteNode node.
func (*DefaultVisitor) VisitInstanceVariableReadNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitInstanceVariableReadNode(node *InstanceVariableReadNode)
VisitInstanceVariableReadNode visits a InstanceVariableReadNode node.
func (*DefaultVisitor) VisitInstanceVariableTargetNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitInstanceVariableTargetNode(node *InstanceVariableTargetNode)
VisitInstanceVariableTargetNode visits a InstanceVariableTargetNode node.
func (*DefaultVisitor) VisitInstanceVariableWriteNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitInstanceVariableWriteNode(node *InstanceVariableWriteNode)
VisitInstanceVariableWriteNode visits a InstanceVariableWriteNode node.
func (*DefaultVisitor) VisitIntegerNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitIntegerNode(node *IntegerNode)
VisitIntegerNode visits a IntegerNode node.
func (*DefaultVisitor) VisitInterpolatedMatchLastLineNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitInterpolatedMatchLastLineNode(node *InterpolatedMatchLastLineNode)
VisitInterpolatedMatchLastLineNode visits a InterpolatedMatchLastLineNode node.
func (*DefaultVisitor) VisitInterpolatedRegularExpressionNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitInterpolatedRegularExpressionNode(node *InterpolatedRegularExpressionNode)
VisitInterpolatedRegularExpressionNode visits a InterpolatedRegularExpressionNode node.
func (*DefaultVisitor) VisitInterpolatedStringNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitInterpolatedStringNode(node *InterpolatedStringNode)
VisitInterpolatedStringNode visits a InterpolatedStringNode node.
func (*DefaultVisitor) VisitInterpolatedSymbolNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitInterpolatedSymbolNode(node *InterpolatedSymbolNode)
VisitInterpolatedSymbolNode visits a InterpolatedSymbolNode node.
func (*DefaultVisitor) VisitInterpolatedXStringNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitInterpolatedXStringNode(node *InterpolatedXStringNode)
VisitInterpolatedXStringNode visits a InterpolatedXStringNode node.
func (*DefaultVisitor) VisitItLocalVariableReadNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitItLocalVariableReadNode(node *ItLocalVariableReadNode)
VisitItLocalVariableReadNode visits a ItLocalVariableReadNode node.
func (*DefaultVisitor) VisitItParametersNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitItParametersNode(node *ItParametersNode)
VisitItParametersNode visits a ItParametersNode node.
func (*DefaultVisitor) VisitKeywordHashNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitKeywordHashNode(node *KeywordHashNode)
VisitKeywordHashNode visits a KeywordHashNode node.
func (*DefaultVisitor) VisitKeywordRestParameterNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitKeywordRestParameterNode(node *KeywordRestParameterNode)
VisitKeywordRestParameterNode visits a KeywordRestParameterNode node.
func (*DefaultVisitor) VisitLambdaNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitLambdaNode(node *LambdaNode)
VisitLambdaNode visits a LambdaNode node.
func (*DefaultVisitor) VisitLocalVariableAndWriteNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitLocalVariableAndWriteNode(node *LocalVariableAndWriteNode)
VisitLocalVariableAndWriteNode visits a LocalVariableAndWriteNode node.
func (*DefaultVisitor) VisitLocalVariableOperatorWriteNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitLocalVariableOperatorWriteNode(node *LocalVariableOperatorWriteNode)
VisitLocalVariableOperatorWriteNode visits a LocalVariableOperatorWriteNode node.
func (*DefaultVisitor) VisitLocalVariableOrWriteNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitLocalVariableOrWriteNode(node *LocalVariableOrWriteNode)
VisitLocalVariableOrWriteNode visits a LocalVariableOrWriteNode node.
func (*DefaultVisitor) VisitLocalVariableReadNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitLocalVariableReadNode(node *LocalVariableReadNode)
VisitLocalVariableReadNode visits a LocalVariableReadNode node.
func (*DefaultVisitor) VisitLocalVariableTargetNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitLocalVariableTargetNode(node *LocalVariableTargetNode)
VisitLocalVariableTargetNode visits a LocalVariableTargetNode node.
func (*DefaultVisitor) VisitLocalVariableWriteNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitLocalVariableWriteNode(node *LocalVariableWriteNode)
VisitLocalVariableWriteNode visits a LocalVariableWriteNode node.
func (*DefaultVisitor) VisitMatchLastLineNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitMatchLastLineNode(node *MatchLastLineNode)
VisitMatchLastLineNode visits a MatchLastLineNode node.
func (*DefaultVisitor) VisitMatchPredicateNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitMatchPredicateNode(node *MatchPredicateNode)
VisitMatchPredicateNode visits a MatchPredicateNode node.
func (*DefaultVisitor) VisitMatchRequiredNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitMatchRequiredNode(node *MatchRequiredNode)
VisitMatchRequiredNode visits a MatchRequiredNode node.
func (*DefaultVisitor) VisitMatchWriteNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitMatchWriteNode(node *MatchWriteNode)
VisitMatchWriteNode visits a MatchWriteNode node.
func (*DefaultVisitor) VisitMissingNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitMissingNode(node *MissingNode)
VisitMissingNode visits a MissingNode node.
func (*DefaultVisitor) VisitModuleNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitModuleNode(node *ModuleNode)
VisitModuleNode visits a ModuleNode node.
func (*DefaultVisitor) VisitMultiTargetNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitMultiTargetNode(node *MultiTargetNode)
VisitMultiTargetNode visits a MultiTargetNode node.
func (*DefaultVisitor) VisitMultiWriteNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitMultiWriteNode(node *MultiWriteNode)
VisitMultiWriteNode visits a MultiWriteNode node.
func (*DefaultVisitor) VisitNextNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitNextNode(node *NextNode)
VisitNextNode visits a NextNode node.
func (*DefaultVisitor) VisitNilNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitNilNode(node *NilNode)
VisitNilNode visits a NilNode node.
func (*DefaultVisitor) VisitNoKeywordsParameterNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitNoKeywordsParameterNode(node *NoKeywordsParameterNode)
VisitNoKeywordsParameterNode visits a NoKeywordsParameterNode node.
func (*DefaultVisitor) VisitNumberedParametersNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitNumberedParametersNode(node *NumberedParametersNode)
VisitNumberedParametersNode visits a NumberedParametersNode node.
func (*DefaultVisitor) VisitNumberedReferenceReadNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitNumberedReferenceReadNode(node *NumberedReferenceReadNode)
VisitNumberedReferenceReadNode visits a NumberedReferenceReadNode node.
func (*DefaultVisitor) VisitOptionalKeywordParameterNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitOptionalKeywordParameterNode(node *OptionalKeywordParameterNode)
VisitOptionalKeywordParameterNode visits a OptionalKeywordParameterNode node.
func (*DefaultVisitor) VisitOptionalParameterNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitOptionalParameterNode(node *OptionalParameterNode)
VisitOptionalParameterNode visits a OptionalParameterNode node.
func (*DefaultVisitor) VisitOrNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitOrNode(node *OrNode)
VisitOrNode visits a OrNode node.
func (*DefaultVisitor) VisitParametersNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitParametersNode(node *ParametersNode)
VisitParametersNode visits a ParametersNode node.
func (*DefaultVisitor) VisitParenthesesNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitParenthesesNode(node *ParenthesesNode)
VisitParenthesesNode visits a ParenthesesNode node.
func (*DefaultVisitor) VisitPinnedExpressionNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitPinnedExpressionNode(node *PinnedExpressionNode)
VisitPinnedExpressionNode visits a PinnedExpressionNode node.
func (*DefaultVisitor) VisitPinnedVariableNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitPinnedVariableNode(node *PinnedVariableNode)
VisitPinnedVariableNode visits a PinnedVariableNode node.
func (*DefaultVisitor) VisitPostExecutionNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitPostExecutionNode(node *PostExecutionNode)
VisitPostExecutionNode visits a PostExecutionNode node.
func (*DefaultVisitor) VisitPreExecutionNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitPreExecutionNode(node *PreExecutionNode)
VisitPreExecutionNode visits a PreExecutionNode node.
func (*DefaultVisitor) VisitProgramNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitProgramNode(node *ProgramNode)
VisitProgramNode visits a ProgramNode node.
func (*DefaultVisitor) VisitRangeNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitRangeNode(node *RangeNode)
VisitRangeNode visits a RangeNode node.
func (*DefaultVisitor) VisitRationalNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitRationalNode(node *RationalNode)
VisitRationalNode visits a RationalNode node.
func (*DefaultVisitor) VisitRedoNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitRedoNode(node *RedoNode)
VisitRedoNode visits a RedoNode node.
func (*DefaultVisitor) VisitRegularExpressionNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitRegularExpressionNode(node *RegularExpressionNode)
VisitRegularExpressionNode visits a RegularExpressionNode node.
func (*DefaultVisitor) VisitRequiredKeywordParameterNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitRequiredKeywordParameterNode(node *RequiredKeywordParameterNode)
VisitRequiredKeywordParameterNode visits a RequiredKeywordParameterNode node.
func (*DefaultVisitor) VisitRequiredParameterNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitRequiredParameterNode(node *RequiredParameterNode)
VisitRequiredParameterNode visits a RequiredParameterNode node.
func (*DefaultVisitor) VisitRescueModifierNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitRescueModifierNode(node *RescueModifierNode)
VisitRescueModifierNode visits a RescueModifierNode node.
func (*DefaultVisitor) VisitRescueNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitRescueNode(node *RescueNode)
VisitRescueNode visits a RescueNode node.
func (*DefaultVisitor) VisitRestParameterNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitRestParameterNode(node *RestParameterNode)
VisitRestParameterNode visits a RestParameterNode node.
func (*DefaultVisitor) VisitRetryNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitRetryNode(node *RetryNode)
VisitRetryNode visits a RetryNode node.
func (*DefaultVisitor) VisitReturnNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitReturnNode(node *ReturnNode)
VisitReturnNode visits a ReturnNode node.
func (*DefaultVisitor) VisitSelfNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitSelfNode(node *SelfNode)
VisitSelfNode visits a SelfNode node.
func (*DefaultVisitor) VisitShareableConstantNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitShareableConstantNode(node *ShareableConstantNode)
VisitShareableConstantNode visits a ShareableConstantNode node.
func (*DefaultVisitor) VisitSingletonClassNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitSingletonClassNode(node *SingletonClassNode)
VisitSingletonClassNode visits a SingletonClassNode node.
func (*DefaultVisitor) VisitSourceEncodingNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitSourceEncodingNode(node *SourceEncodingNode)
VisitSourceEncodingNode visits a SourceEncodingNode node.
func (*DefaultVisitor) VisitSourceFileNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitSourceFileNode(node *SourceFileNode)
VisitSourceFileNode visits a SourceFileNode node.
func (*DefaultVisitor) VisitSourceLineNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitSourceLineNode(node *SourceLineNode)
VisitSourceLineNode visits a SourceLineNode node.
func (*DefaultVisitor) VisitSplatNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitSplatNode(node *SplatNode)
VisitSplatNode visits a SplatNode node.
func (*DefaultVisitor) VisitStatementsNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitStatementsNode(node *StatementsNode)
VisitStatementsNode visits a StatementsNode node.
func (*DefaultVisitor) VisitStringNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitStringNode(node *StringNode)
VisitStringNode visits a StringNode node.
func (*DefaultVisitor) VisitSuperNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitSuperNode(node *SuperNode)
VisitSuperNode visits a SuperNode node.
func (*DefaultVisitor) VisitSymbolNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitSymbolNode(node *SymbolNode)
VisitSymbolNode visits a SymbolNode node.
func (*DefaultVisitor) VisitTrueNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitTrueNode(node *TrueNode)
VisitTrueNode visits a TrueNode node.
func (*DefaultVisitor) VisitUndefNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitUndefNode(node *UndefNode)
VisitUndefNode visits a UndefNode node.
func (*DefaultVisitor) VisitUnlessNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitUnlessNode(node *UnlessNode)
VisitUnlessNode visits a UnlessNode node.
func (*DefaultVisitor) VisitUntilNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitUntilNode(node *UntilNode)
VisitUntilNode visits a UntilNode node.
func (*DefaultVisitor) VisitWhenNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitWhenNode(node *WhenNode)
VisitWhenNode visits a WhenNode node.
func (*DefaultVisitor) VisitWhileNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitWhileNode(node *WhileNode)
VisitWhileNode visits a WhileNode node.
func (*DefaultVisitor) VisitXStringNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitXStringNode(node *XStringNode)
VisitXStringNode visits a XStringNode node.
func (*DefaultVisitor) VisitYieldNode ¶ added in v1.1.0
func (v *DefaultVisitor) VisitYieldNode(node *YieldNode)
VisitYieldNode visits a YieldNode node.
type DefinedNode ¶
type DefinedNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` LparenLoc *Location `json:"lparen_loc"` Value Node `json:"value"` RparenLoc *Location `json:"rparen_loc"` KeywordLoc Location `json:"keyword_loc"` // contains filtered or unexported fields }
Represents the use of the `defined?` keyword.
defined?(a) ^^^^^^^^^^^
func NewDefinedNode ¶
func NewDefinedNode(nodeID int, location Location, flags uint32, lparen_loc *Location, value Node, rparen_loc *Location, keyword_loc Location) *DefinedNode
NewDefinedNode creates a new DefinedNode.
func (*DefinedNode) Accept ¶
func (n *DefinedNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*DefinedNode) ChildNodes ¶ added in v1.1.0
func (n *DefinedNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*DefinedNode) CompactChildNodes ¶ added in v1.1.0
func (n *DefinedNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*DefinedNode) GetLocation ¶ added in v1.1.0
func (n *DefinedNode) GetLocation() Location
GetLocation returns the location of this node.
func (*DefinedNode) GetNodeID ¶ added in v1.1.0
func (n *DefinedNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*DefinedNode) ToJSON ¶ added in v1.1.0
func (n *DefinedNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type ElseNode ¶
type ElseNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` ElseKeywordLoc Location `json:"else_keyword_loc"` Statements *StatementsNode `json:"statements"` EndKeywordLoc *Location `json:"end_keyword_loc"` // contains filtered or unexported fields }
Represents an `else` clause in a `case`, `if`, or `unless` statement.
if a then b else c end ^^^^^^^^^^
func NewElseNode ¶
func NewElseNode(nodeID int, location Location, flags uint32, else_keyword_loc Location, statements *StatementsNode, end_keyword_loc *Location) *ElseNode
NewElseNode creates a new ElseNode.
func (*ElseNode) ChildNodes ¶ added in v1.1.0
ChildNodes returns all child nodes of the current node.
func (*ElseNode) CompactChildNodes ¶ added in v1.1.0
CompactChildNodes returns all non-nil child nodes.
func (*ElseNode) GetLocation ¶ added in v1.1.0
GetLocation returns the location of this node.
type EmbeddedStatementsNode ¶
type EmbeddedStatementsNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` OpeningLoc Location `json:"opening_loc"` Statements *StatementsNode `json:"statements"` ClosingLoc Location `json:"closing_loc"` // contains filtered or unexported fields }
Represents an interpolated set of statements.
"foo #{bar}" ^^^^^^
func NewEmbeddedStatementsNode ¶
func NewEmbeddedStatementsNode(nodeID int, location Location, flags uint32, opening_loc Location, statements *StatementsNode, closing_loc Location) *EmbeddedStatementsNode
NewEmbeddedStatementsNode creates a new EmbeddedStatementsNode.
func (*EmbeddedStatementsNode) Accept ¶
func (n *EmbeddedStatementsNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*EmbeddedStatementsNode) ChildNodes ¶ added in v1.1.0
func (n *EmbeddedStatementsNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*EmbeddedStatementsNode) CompactChildNodes ¶ added in v1.1.0
func (n *EmbeddedStatementsNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*EmbeddedStatementsNode) GetLocation ¶ added in v1.1.0
func (n *EmbeddedStatementsNode) GetLocation() Location
GetLocation returns the location of this node.
func (*EmbeddedStatementsNode) GetNodeID ¶ added in v1.1.0
func (n *EmbeddedStatementsNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*EmbeddedStatementsNode) ToJSON ¶ added in v1.1.0
func (n *EmbeddedStatementsNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type EmbeddedVariableNode ¶
type EmbeddedVariableNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` OperatorLoc Location `json:"operator_loc"` Variable Node `json:"variable"` // contains filtered or unexported fields }
Represents an interpolated variable.
"foo #@bar" ^^^^^
func NewEmbeddedVariableNode ¶
func NewEmbeddedVariableNode(nodeID int, location Location, flags uint32, operator_loc Location, variable Node) *EmbeddedVariableNode
NewEmbeddedVariableNode creates a new EmbeddedVariableNode.
func (*EmbeddedVariableNode) Accept ¶
func (n *EmbeddedVariableNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*EmbeddedVariableNode) ChildNodes ¶ added in v1.1.0
func (n *EmbeddedVariableNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*EmbeddedVariableNode) CompactChildNodes ¶ added in v1.1.0
func (n *EmbeddedVariableNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*EmbeddedVariableNode) GetLocation ¶ added in v1.1.0
func (n *EmbeddedVariableNode) GetLocation() Location
GetLocation returns the location of this node.
func (*EmbeddedVariableNode) GetNodeID ¶ added in v1.1.0
func (n *EmbeddedVariableNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*EmbeddedVariableNode) ToJSON ¶ added in v1.1.0
func (n *EmbeddedVariableNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type EnsureNode ¶
type EnsureNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` EnsureKeywordLoc Location `json:"ensure_keyword_loc"` Statements *StatementsNode `json:"statements"` EndKeywordLoc Location `json:"end_keyword_loc"` // contains filtered or unexported fields }
Represents an `ensure` clause in a `begin` statement.
begin foo ensure ^^^^^^ bar end
func NewEnsureNode ¶
func NewEnsureNode(nodeID int, location Location, flags uint32, ensure_keyword_loc Location, statements *StatementsNode, end_keyword_loc Location) *EnsureNode
NewEnsureNode creates a new EnsureNode.
func (*EnsureNode) Accept ¶
func (n *EnsureNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*EnsureNode) ChildNodes ¶ added in v1.1.0
func (n *EnsureNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*EnsureNode) CompactChildNodes ¶ added in v1.1.0
func (n *EnsureNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*EnsureNode) GetLocation ¶ added in v1.1.0
func (n *EnsureNode) GetLocation() Location
GetLocation returns the location of this node.
func (*EnsureNode) GetNodeID ¶ added in v1.1.0
func (n *EnsureNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*EnsureNode) ToJSON ¶ added in v1.1.0
func (n *EnsureNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type FalseNode ¶
type FalseNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` // contains filtered or unexported fields }
Represents the use of the literal `false` keyword.
false ^^^^^
func NewFalseNode ¶
NewFalseNode creates a new FalseNode.
func (*FalseNode) ChildNodes ¶ added in v1.1.0
ChildNodes returns all child nodes of the current node.
func (*FalseNode) CompactChildNodes ¶ added in v1.1.0
CompactChildNodes returns all non-nil child nodes.
func (*FalseNode) GetLocation ¶ added in v1.1.0
GetLocation returns the location of this node.
type FindPatternNode ¶
type FindPatternNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Constant Node `json:"constant"` Left *SplatNode `json:"left"` Requireds []Node `json:"requireds"` Right Node `json:"right"` OpeningLoc *Location `json:"opening_loc"` ClosingLoc *Location `json:"closing_loc"` // contains filtered or unexported fields }
Represents a find pattern in pattern matching.
foo in *bar, baz, *qux ^^^^^^^^^^^^^^^ foo in [*bar, baz, *qux] ^^^^^^^^^^^^^^^^^ foo in Foo(*bar, baz, *qux) ^^^^^^^^^^^^^^^^^^^^
func NewFindPatternNode ¶
func NewFindPatternNode(nodeID int, location Location, flags uint32, constant Node, left *SplatNode, requireds []Node, right Node, opening_loc *Location, closing_loc *Location) *FindPatternNode
NewFindPatternNode creates a new FindPatternNode.
func (*FindPatternNode) Accept ¶
func (n *FindPatternNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*FindPatternNode) ChildNodes ¶ added in v1.1.0
func (n *FindPatternNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*FindPatternNode) CompactChildNodes ¶ added in v1.1.0
func (n *FindPatternNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*FindPatternNode) GetLocation ¶ added in v1.1.0
func (n *FindPatternNode) GetLocation() Location
GetLocation returns the location of this node.
func (*FindPatternNode) GetNodeID ¶ added in v1.1.0
func (n *FindPatternNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*FindPatternNode) ToJSON ¶ added in v1.1.0
func (n *FindPatternNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type FlipFlopNode ¶
type FlipFlopNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Left Node `json:"left"` Right Node `json:"right"` OperatorLoc Location `json:"operator_loc"` // contains filtered or unexported fields }
Represents the use of the `..` or `...` operators to create flip flops.
baz if foo .. bar ^^^^^^^^^^
func NewFlipFlopNode ¶
func NewFlipFlopNode(nodeID int, location Location, flags uint32, left Node, right Node, operator_loc Location) *FlipFlopNode
NewFlipFlopNode creates a new FlipFlopNode.
func (*FlipFlopNode) Accept ¶
func (n *FlipFlopNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*FlipFlopNode) ChildNodes ¶ added in v1.1.0
func (n *FlipFlopNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*FlipFlopNode) CompactChildNodes ¶ added in v1.1.0
func (n *FlipFlopNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*FlipFlopNode) GetLocation ¶ added in v1.1.0
func (n *FlipFlopNode) GetLocation() Location
GetLocation returns the location of this node.
func (*FlipFlopNode) GetNodeID ¶ added in v1.1.0
func (n *FlipFlopNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*FlipFlopNode) IsEXCLUDE_END ¶ added in v1.1.0
func (n *FlipFlopNode) IsEXCLUDE_END() bool
IsEXCLUDE_END returns true if this node has the EXCLUDE_END flag.
func (*FlipFlopNode) ToJSON ¶ added in v1.1.0
func (n *FlipFlopNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type FloatNode ¶
type FloatNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Value float64 `json:"value"` // contains filtered or unexported fields }
Represents a floating point number literal.
1.0 ^^^
func NewFloatNode ¶
NewFloatNode creates a new FloatNode.
func (*FloatNode) ChildNodes ¶ added in v1.1.0
ChildNodes returns all child nodes of the current node.
func (*FloatNode) CompactChildNodes ¶ added in v1.1.0
CompactChildNodes returns all non-nil child nodes.
func (*FloatNode) GetLocation ¶ added in v1.1.0
GetLocation returns the location of this node.
type ForNode ¶
type ForNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Index Node `json:"index"` Collection Node `json:"collection"` Statements *StatementsNode `json:"statements"` ForKeywordLoc Location `json:"for_keyword_loc"` InKeywordLoc Location `json:"in_keyword_loc"` DoKeywordLoc *Location `json:"do_keyword_loc"` EndKeywordLoc Location `json:"end_keyword_loc"` // contains filtered or unexported fields }
Represents the use of the `for` keyword.
for i in a end ^^^^^^^^^^^^^^
func NewForNode ¶
func NewForNode(nodeID int, location Location, flags uint32, index Node, collection Node, statements *StatementsNode, for_keyword_loc Location, in_keyword_loc Location, do_keyword_loc *Location, end_keyword_loc Location) *ForNode
NewForNode creates a new ForNode.
func (*ForNode) ChildNodes ¶ added in v1.1.0
ChildNodes returns all child nodes of the current node.
func (*ForNode) CompactChildNodes ¶ added in v1.1.0
CompactChildNodes returns all non-nil child nodes.
func (*ForNode) GetLocation ¶ added in v1.1.0
GetLocation returns the location of this node.
type ForwardingArgumentsNode ¶
type ForwardingArgumentsNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` // contains filtered or unexported fields }
Represents forwarding all arguments to this method to another method.
def foo(...) bar(...) ^^^ end
func NewForwardingArgumentsNode ¶
func NewForwardingArgumentsNode(nodeID int, location Location, flags uint32) *ForwardingArgumentsNode
NewForwardingArgumentsNode creates a new ForwardingArgumentsNode.
func (*ForwardingArgumentsNode) Accept ¶
func (n *ForwardingArgumentsNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*ForwardingArgumentsNode) ChildNodes ¶ added in v1.1.0
func (n *ForwardingArgumentsNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*ForwardingArgumentsNode) CompactChildNodes ¶ added in v1.1.0
func (n *ForwardingArgumentsNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*ForwardingArgumentsNode) GetLocation ¶ added in v1.1.0
func (n *ForwardingArgumentsNode) GetLocation() Location
GetLocation returns the location of this node.
func (*ForwardingArgumentsNode) GetNodeID ¶ added in v1.1.0
func (n *ForwardingArgumentsNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*ForwardingArgumentsNode) ToJSON ¶ added in v1.1.0
func (n *ForwardingArgumentsNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type ForwardingParameterNode ¶
type ForwardingParameterNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` // contains filtered or unexported fields }
Represents the use of the forwarding parameter in a method, block, or lambda declaration.
def foo(...) ^^^ end
func NewForwardingParameterNode ¶
func NewForwardingParameterNode(nodeID int, location Location, flags uint32) *ForwardingParameterNode
NewForwardingParameterNode creates a new ForwardingParameterNode.
func (*ForwardingParameterNode) Accept ¶
func (n *ForwardingParameterNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*ForwardingParameterNode) ChildNodes ¶ added in v1.1.0
func (n *ForwardingParameterNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*ForwardingParameterNode) CompactChildNodes ¶ added in v1.1.0
func (n *ForwardingParameterNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*ForwardingParameterNode) GetLocation ¶ added in v1.1.0
func (n *ForwardingParameterNode) GetLocation() Location
GetLocation returns the location of this node.
func (*ForwardingParameterNode) GetNodeID ¶ added in v1.1.0
func (n *ForwardingParameterNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*ForwardingParameterNode) ToJSON ¶ added in v1.1.0
func (n *ForwardingParameterNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type ForwardingSuperNode ¶
type ForwardingSuperNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Block *BlockNode `json:"block"` // contains filtered or unexported fields }
Represents the use of the `super` keyword without parentheses or arguments.
super ^^^^^
func NewForwardingSuperNode ¶
func NewForwardingSuperNode(nodeID int, location Location, flags uint32, block *BlockNode) *ForwardingSuperNode
NewForwardingSuperNode creates a new ForwardingSuperNode.
func (*ForwardingSuperNode) Accept ¶
func (n *ForwardingSuperNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*ForwardingSuperNode) ChildNodes ¶ added in v1.1.0
func (n *ForwardingSuperNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*ForwardingSuperNode) CompactChildNodes ¶ added in v1.1.0
func (n *ForwardingSuperNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*ForwardingSuperNode) GetLocation ¶ added in v1.1.0
func (n *ForwardingSuperNode) GetLocation() Location
GetLocation returns the location of this node.
func (*ForwardingSuperNode) GetNodeID ¶ added in v1.1.0
func (n *ForwardingSuperNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*ForwardingSuperNode) ToJSON ¶ added in v1.1.0
func (n *ForwardingSuperNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type GlobalVariableAndWriteNode ¶
type GlobalVariableAndWriteNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Name string `json:"name"` NameLoc Location `json:"name_loc"` OperatorLoc Location `json:"operator_loc"` Value Node `json:"value"` // contains filtered or unexported fields }
Represents the use of the `&&=` operator for assignment to a global variable.
$target &&= value ^^^^^^^^^^^^^^^^^
func NewGlobalVariableAndWriteNode ¶
func NewGlobalVariableAndWriteNode(nodeID int, location Location, flags uint32, name string, name_loc Location, operator_loc Location, value Node) *GlobalVariableAndWriteNode
NewGlobalVariableAndWriteNode creates a new GlobalVariableAndWriteNode.
func (*GlobalVariableAndWriteNode) Accept ¶
func (n *GlobalVariableAndWriteNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*GlobalVariableAndWriteNode) ChildNodes ¶ added in v1.1.0
func (n *GlobalVariableAndWriteNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*GlobalVariableAndWriteNode) CompactChildNodes ¶ added in v1.1.0
func (n *GlobalVariableAndWriteNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*GlobalVariableAndWriteNode) GetLocation ¶ added in v1.1.0
func (n *GlobalVariableAndWriteNode) GetLocation() Location
GetLocation returns the location of this node.
func (*GlobalVariableAndWriteNode) GetNodeID ¶ added in v1.1.0
func (n *GlobalVariableAndWriteNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*GlobalVariableAndWriteNode) ToJSON ¶ added in v1.1.0
func (n *GlobalVariableAndWriteNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type GlobalVariableOperatorWriteNode ¶
type GlobalVariableOperatorWriteNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Name string `json:"name"` NameLoc Location `json:"name_loc"` BinaryOperatorLoc Location `json:"binary_operator_loc"` Value Node `json:"value"` BinaryOperator string `json:"binary_operator"` // contains filtered or unexported fields }
Represents assigning to a global variable using an operator that isn't `=`.
$target += value ^^^^^^^^^^^^^^^^
func NewGlobalVariableOperatorWriteNode ¶
func NewGlobalVariableOperatorWriteNode(nodeID int, location Location, flags uint32, name string, name_loc Location, binary_operator_loc Location, value Node, binary_operator string) *GlobalVariableOperatorWriteNode
NewGlobalVariableOperatorWriteNode creates a new GlobalVariableOperatorWriteNode.
func (*GlobalVariableOperatorWriteNode) Accept ¶
func (n *GlobalVariableOperatorWriteNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*GlobalVariableOperatorWriteNode) ChildNodes ¶ added in v1.1.0
func (n *GlobalVariableOperatorWriteNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*GlobalVariableOperatorWriteNode) CompactChildNodes ¶ added in v1.1.0
func (n *GlobalVariableOperatorWriteNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*GlobalVariableOperatorWriteNode) GetLocation ¶ added in v1.1.0
func (n *GlobalVariableOperatorWriteNode) GetLocation() Location
GetLocation returns the location of this node.
func (*GlobalVariableOperatorWriteNode) GetNodeID ¶ added in v1.1.0
func (n *GlobalVariableOperatorWriteNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*GlobalVariableOperatorWriteNode) ToJSON ¶ added in v1.1.0
func (n *GlobalVariableOperatorWriteNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type GlobalVariableOrWriteNode ¶
type GlobalVariableOrWriteNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Name string `json:"name"` NameLoc Location `json:"name_loc"` OperatorLoc Location `json:"operator_loc"` Value Node `json:"value"` // contains filtered or unexported fields }
Represents the use of the `||=` operator for assignment to a global variable.
$target ||= value ^^^^^^^^^^^^^^^^^
func NewGlobalVariableOrWriteNode ¶
func NewGlobalVariableOrWriteNode(nodeID int, location Location, flags uint32, name string, name_loc Location, operator_loc Location, value Node) *GlobalVariableOrWriteNode
NewGlobalVariableOrWriteNode creates a new GlobalVariableOrWriteNode.
func (*GlobalVariableOrWriteNode) Accept ¶
func (n *GlobalVariableOrWriteNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*GlobalVariableOrWriteNode) ChildNodes ¶ added in v1.1.0
func (n *GlobalVariableOrWriteNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*GlobalVariableOrWriteNode) CompactChildNodes ¶ added in v1.1.0
func (n *GlobalVariableOrWriteNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*GlobalVariableOrWriteNode) GetLocation ¶ added in v1.1.0
func (n *GlobalVariableOrWriteNode) GetLocation() Location
GetLocation returns the location of this node.
func (*GlobalVariableOrWriteNode) GetNodeID ¶ added in v1.1.0
func (n *GlobalVariableOrWriteNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*GlobalVariableOrWriteNode) ToJSON ¶ added in v1.1.0
func (n *GlobalVariableOrWriteNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type GlobalVariableReadNode ¶
type GlobalVariableReadNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Name string `json:"name"` // contains filtered or unexported fields }
Represents referencing a global variable.
$foo ^^^^
func NewGlobalVariableReadNode ¶
func NewGlobalVariableReadNode(nodeID int, location Location, flags uint32, name string) *GlobalVariableReadNode
NewGlobalVariableReadNode creates a new GlobalVariableReadNode.
func (*GlobalVariableReadNode) Accept ¶
func (n *GlobalVariableReadNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*GlobalVariableReadNode) ChildNodes ¶ added in v1.1.0
func (n *GlobalVariableReadNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*GlobalVariableReadNode) CompactChildNodes ¶ added in v1.1.0
func (n *GlobalVariableReadNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*GlobalVariableReadNode) GetLocation ¶ added in v1.1.0
func (n *GlobalVariableReadNode) GetLocation() Location
GetLocation returns the location of this node.
func (*GlobalVariableReadNode) GetNodeID ¶ added in v1.1.0
func (n *GlobalVariableReadNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*GlobalVariableReadNode) ToJSON ¶ added in v1.1.0
func (n *GlobalVariableReadNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type GlobalVariableTargetNode ¶
type GlobalVariableTargetNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Name string `json:"name"` // contains filtered or unexported fields }
Represents writing to a global variable in a context that doesn't have an explicit value.
$foo, $bar = baz ^^^^ ^^^^
func NewGlobalVariableTargetNode ¶
func NewGlobalVariableTargetNode(nodeID int, location Location, flags uint32, name string) *GlobalVariableTargetNode
NewGlobalVariableTargetNode creates a new GlobalVariableTargetNode.
func (*GlobalVariableTargetNode) Accept ¶
func (n *GlobalVariableTargetNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*GlobalVariableTargetNode) ChildNodes ¶ added in v1.1.0
func (n *GlobalVariableTargetNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*GlobalVariableTargetNode) CompactChildNodes ¶ added in v1.1.0
func (n *GlobalVariableTargetNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*GlobalVariableTargetNode) GetLocation ¶ added in v1.1.0
func (n *GlobalVariableTargetNode) GetLocation() Location
GetLocation returns the location of this node.
func (*GlobalVariableTargetNode) GetNodeID ¶ added in v1.1.0
func (n *GlobalVariableTargetNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*GlobalVariableTargetNode) ToJSON ¶ added in v1.1.0
func (n *GlobalVariableTargetNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type GlobalVariableWriteNode ¶
type GlobalVariableWriteNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Name string `json:"name"` NameLoc Location `json:"name_loc"` Value Node `json:"value"` OperatorLoc Location `json:"operator_loc"` // contains filtered or unexported fields }
Represents writing to a global variable.
$foo = 1 ^^^^^^^^
func NewGlobalVariableWriteNode ¶
func NewGlobalVariableWriteNode(nodeID int, location Location, flags uint32, name string, name_loc Location, value Node, operator_loc Location) *GlobalVariableWriteNode
NewGlobalVariableWriteNode creates a new GlobalVariableWriteNode.
func (*GlobalVariableWriteNode) Accept ¶
func (n *GlobalVariableWriteNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*GlobalVariableWriteNode) ChildNodes ¶ added in v1.1.0
func (n *GlobalVariableWriteNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*GlobalVariableWriteNode) CompactChildNodes ¶ added in v1.1.0
func (n *GlobalVariableWriteNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*GlobalVariableWriteNode) GetLocation ¶ added in v1.1.0
func (n *GlobalVariableWriteNode) GetLocation() Location
GetLocation returns the location of this node.
func (*GlobalVariableWriteNode) GetNodeID ¶ added in v1.1.0
func (n *GlobalVariableWriteNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*GlobalVariableWriteNode) ToJSON ¶ added in v1.1.0
func (n *GlobalVariableWriteNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type HashNode ¶
type HashNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` OpeningLoc Location `json:"opening_loc"` Elements []Node `json:"elements"` ClosingLoc Location `json:"closing_loc"` // contains filtered or unexported fields }
Represents a hash literal.
{ a => b } ^^^^^^^^^^
func NewHashNode ¶
func NewHashNode(nodeID int, location Location, flags uint32, opening_loc Location, elements []Node, closing_loc Location) *HashNode
NewHashNode creates a new HashNode.
func (*HashNode) ChildNodes ¶ added in v1.1.0
ChildNodes returns all child nodes of the current node.
func (*HashNode) CompactChildNodes ¶ added in v1.1.0
CompactChildNodes returns all non-nil child nodes.
func (*HashNode) GetLocation ¶ added in v1.1.0
GetLocation returns the location of this node.
type HashPatternNode ¶
type HashPatternNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Constant Node `json:"constant"` Elements []Node `json:"elements"` Rest Node `json:"rest"` OpeningLoc *Location `json:"opening_loc"` ClosingLoc *Location `json:"closing_loc"` // contains filtered or unexported fields }
Represents a hash pattern in pattern matching.
foo => { a: 1, b: 2 } ^^^^^^^^^^^^^^ foo => { a: 1, b: 2, **c } ^^^^^^^^^^^^^^^^^^^
func NewHashPatternNode ¶
func NewHashPatternNode(nodeID int, location Location, flags uint32, constant Node, elements []Node, rest Node, opening_loc *Location, closing_loc *Location) *HashPatternNode
NewHashPatternNode creates a new HashPatternNode.
func (*HashPatternNode) Accept ¶
func (n *HashPatternNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*HashPatternNode) ChildNodes ¶ added in v1.1.0
func (n *HashPatternNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*HashPatternNode) CompactChildNodes ¶ added in v1.1.0
func (n *HashPatternNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*HashPatternNode) GetLocation ¶ added in v1.1.0
func (n *HashPatternNode) GetLocation() Location
GetLocation returns the location of this node.
func (*HashPatternNode) GetNodeID ¶ added in v1.1.0
func (n *HashPatternNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*HashPatternNode) ToJSON ¶ added in v1.1.0
func (n *HashPatternNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type IfNode ¶
type IfNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` IfKeywordLoc *Location `json:"if_keyword_loc"` Predicate Node `json:"predicate"` ThenKeywordLoc *Location `json:"then_keyword_loc"` Statements *StatementsNode `json:"statements"` Subsequent Node `json:"subsequent"` EndKeywordLoc *Location `json:"end_keyword_loc"` // contains filtered or unexported fields }
Represents the use of the `if` keyword, either in the block form or the modifier form, or a ternary expression.
bar if foo ^^^^^^^^^^ if foo then bar end ^^^^^^^^^^^^^^^^^^^ foo ? bar : baz ^^^^^^^^^^^^^^^
func NewIfNode ¶
func NewIfNode(nodeID int, location Location, flags uint32, if_keyword_loc *Location, predicate Node, then_keyword_loc *Location, statements *StatementsNode, subsequent Node, end_keyword_loc *Location) *IfNode
NewIfNode creates a new IfNode.
func (*IfNode) ChildNodes ¶ added in v1.1.0
ChildNodes returns all child nodes of the current node.
func (*IfNode) CompactChildNodes ¶ added in v1.1.0
CompactChildNodes returns all non-nil child nodes.
func (*IfNode) GetLocation ¶ added in v1.1.0
GetLocation returns the location of this node.
type ImaginaryNode ¶
type ImaginaryNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Numeric Node `json:"numeric"` // contains filtered or unexported fields }
Represents an imaginary number literal.
1.0i ^^^^
func NewImaginaryNode ¶
func NewImaginaryNode(nodeID int, location Location, flags uint32, numeric Node) *ImaginaryNode
NewImaginaryNode creates a new ImaginaryNode.
func (*ImaginaryNode) Accept ¶
func (n *ImaginaryNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*ImaginaryNode) ChildNodes ¶ added in v1.1.0
func (n *ImaginaryNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*ImaginaryNode) CompactChildNodes ¶ added in v1.1.0
func (n *ImaginaryNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*ImaginaryNode) GetLocation ¶ added in v1.1.0
func (n *ImaginaryNode) GetLocation() Location
GetLocation returns the location of this node.
func (*ImaginaryNode) GetNodeID ¶ added in v1.1.0
func (n *ImaginaryNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*ImaginaryNode) ToJSON ¶ added in v1.1.0
func (n *ImaginaryNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type ImplicitNode ¶
type ImplicitNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Value Node `json:"value"` // contains filtered or unexported fields }
Represents a node that is implicitly being added to the tree but doesn't correspond directly to a node in the source.
{ foo: } ^^^^ { Foo: } ^^^^ foo in { bar: } ^^^^
func NewImplicitNode ¶
func NewImplicitNode(nodeID int, location Location, flags uint32, value Node) *ImplicitNode
NewImplicitNode creates a new ImplicitNode.
func (*ImplicitNode) Accept ¶
func (n *ImplicitNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*ImplicitNode) ChildNodes ¶ added in v1.1.0
func (n *ImplicitNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*ImplicitNode) CompactChildNodes ¶ added in v1.1.0
func (n *ImplicitNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*ImplicitNode) GetLocation ¶ added in v1.1.0
func (n *ImplicitNode) GetLocation() Location
GetLocation returns the location of this node.
func (*ImplicitNode) GetNodeID ¶ added in v1.1.0
func (n *ImplicitNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*ImplicitNode) ToJSON ¶ added in v1.1.0
func (n *ImplicitNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type ImplicitRestNode ¶
type ImplicitRestNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` // contains filtered or unexported fields }
Represents using a trailing comma to indicate an implicit rest parameter.
foo { |bar,| } ^ foo in [bar,] ^ for foo, in bar do end ^ foo, = bar ^
func NewImplicitRestNode ¶
func NewImplicitRestNode(nodeID int, location Location, flags uint32) *ImplicitRestNode
NewImplicitRestNode creates a new ImplicitRestNode.
func (*ImplicitRestNode) Accept ¶
func (n *ImplicitRestNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*ImplicitRestNode) ChildNodes ¶ added in v1.1.0
func (n *ImplicitRestNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*ImplicitRestNode) CompactChildNodes ¶ added in v1.1.0
func (n *ImplicitRestNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*ImplicitRestNode) GetLocation ¶ added in v1.1.0
func (n *ImplicitRestNode) GetLocation() Location
GetLocation returns the location of this node.
func (*ImplicitRestNode) GetNodeID ¶ added in v1.1.0
func (n *ImplicitRestNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*ImplicitRestNode) ToJSON ¶ added in v1.1.0
func (n *ImplicitRestNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type InNode ¶
type InNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Pattern Node `json:"pattern"` Statements *StatementsNode `json:"statements"` InLoc Location `json:"in_loc"` ThenLoc *Location `json:"then_loc"` // contains filtered or unexported fields }
Represents the use of the `in` keyword in a case statement.
case a; in b then c end ^^^^^^^^^^^
func NewInNode ¶
func NewInNode(nodeID int, location Location, flags uint32, pattern Node, statements *StatementsNode, in_loc Location, then_loc *Location) *InNode
NewInNode creates a new InNode.
func (*InNode) ChildNodes ¶ added in v1.1.0
ChildNodes returns all child nodes of the current node.
func (*InNode) CompactChildNodes ¶ added in v1.1.0
CompactChildNodes returns all non-nil child nodes.
func (*InNode) GetLocation ¶ added in v1.1.0
GetLocation returns the location of this node.
type IndexAndWriteNode ¶
type IndexAndWriteNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Receiver Node `json:"receiver"` CallOperatorLoc *Location `json:"call_operator_loc"` OpeningLoc Location `json:"opening_loc"` Arguments *ArgumentsNode `json:"arguments"` ClosingLoc Location `json:"closing_loc"` Block *BlockArgumentNode `json:"block"` OperatorLoc Location `json:"operator_loc"` Value Node `json:"value"` // contains filtered or unexported fields }
Represents the use of the `&&=` operator on a call to the `[]` method.
foo.bar[baz] &&= value ^^^^^^^^^^^^^^^^^^^^^^
func NewIndexAndWriteNode ¶
func NewIndexAndWriteNode(nodeID int, location Location, flags uint32, receiver Node, call_operator_loc *Location, opening_loc Location, arguments *ArgumentsNode, closing_loc Location, block *BlockArgumentNode, operator_loc Location, value Node) *IndexAndWriteNode
NewIndexAndWriteNode creates a new IndexAndWriteNode.
func (*IndexAndWriteNode) Accept ¶
func (n *IndexAndWriteNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*IndexAndWriteNode) ChildNodes ¶ added in v1.1.0
func (n *IndexAndWriteNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*IndexAndWriteNode) CompactChildNodes ¶ added in v1.1.0
func (n *IndexAndWriteNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*IndexAndWriteNode) GetLocation ¶ added in v1.1.0
func (n *IndexAndWriteNode) GetLocation() Location
GetLocation returns the location of this node.
func (*IndexAndWriteNode) GetNodeID ¶ added in v1.1.0
func (n *IndexAndWriteNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*IndexAndWriteNode) IsATTRIBUTE_WRITE ¶ added in v1.1.0
func (n *IndexAndWriteNode) IsATTRIBUTE_WRITE() bool
IsATTRIBUTE_WRITE returns true if this node has the ATTRIBUTE_WRITE flag.
func (*IndexAndWriteNode) IsIGNORE_VISIBILITY ¶ added in v1.1.0
func (n *IndexAndWriteNode) IsIGNORE_VISIBILITY() bool
IsIGNORE_VISIBILITY returns true if this node has the IGNORE_VISIBILITY flag.
func (*IndexAndWriteNode) IsSAFE_NAVIGATION ¶ added in v1.1.0
func (n *IndexAndWriteNode) IsSAFE_NAVIGATION() bool
IsSAFE_NAVIGATION returns true if this node has the SAFE_NAVIGATION flag.
func (*IndexAndWriteNode) IsVARIABLE_CALL ¶ added in v1.1.0
func (n *IndexAndWriteNode) IsVARIABLE_CALL() bool
IsVARIABLE_CALL returns true if this node has the VARIABLE_CALL flag.
func (*IndexAndWriteNode) ToJSON ¶ added in v1.1.0
func (n *IndexAndWriteNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type IndexOperatorWriteNode ¶
type IndexOperatorWriteNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Receiver Node `json:"receiver"` CallOperatorLoc *Location `json:"call_operator_loc"` OpeningLoc Location `json:"opening_loc"` Arguments *ArgumentsNode `json:"arguments"` ClosingLoc Location `json:"closing_loc"` Block *BlockArgumentNode `json:"block"` BinaryOperator string `json:"binary_operator"` BinaryOperatorLoc Location `json:"binary_operator_loc"` Value Node `json:"value"` // contains filtered or unexported fields }
Represents the use of an assignment operator on a call to `[]`.
foo.bar[baz] += value ^^^^^^^^^^^^^^^^^^^^^
func NewIndexOperatorWriteNode ¶
func NewIndexOperatorWriteNode(nodeID int, location Location, flags uint32, receiver Node, call_operator_loc *Location, opening_loc Location, arguments *ArgumentsNode, closing_loc Location, block *BlockArgumentNode, binary_operator string, binary_operator_loc Location, value Node) *IndexOperatorWriteNode
NewIndexOperatorWriteNode creates a new IndexOperatorWriteNode.
func (*IndexOperatorWriteNode) Accept ¶
func (n *IndexOperatorWriteNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*IndexOperatorWriteNode) ChildNodes ¶ added in v1.1.0
func (n *IndexOperatorWriteNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*IndexOperatorWriteNode) CompactChildNodes ¶ added in v1.1.0
func (n *IndexOperatorWriteNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*IndexOperatorWriteNode) GetLocation ¶ added in v1.1.0
func (n *IndexOperatorWriteNode) GetLocation() Location
GetLocation returns the location of this node.
func (*IndexOperatorWriteNode) GetNodeID ¶ added in v1.1.0
func (n *IndexOperatorWriteNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*IndexOperatorWriteNode) IsATTRIBUTE_WRITE ¶ added in v1.1.0
func (n *IndexOperatorWriteNode) IsATTRIBUTE_WRITE() bool
IsATTRIBUTE_WRITE returns true if this node has the ATTRIBUTE_WRITE flag.
func (*IndexOperatorWriteNode) IsIGNORE_VISIBILITY ¶ added in v1.1.0
func (n *IndexOperatorWriteNode) IsIGNORE_VISIBILITY() bool
IsIGNORE_VISIBILITY returns true if this node has the IGNORE_VISIBILITY flag.
func (*IndexOperatorWriteNode) IsSAFE_NAVIGATION ¶ added in v1.1.0
func (n *IndexOperatorWriteNode) IsSAFE_NAVIGATION() bool
IsSAFE_NAVIGATION returns true if this node has the SAFE_NAVIGATION flag.
func (*IndexOperatorWriteNode) IsVARIABLE_CALL ¶ added in v1.1.0
func (n *IndexOperatorWriteNode) IsVARIABLE_CALL() bool
IsVARIABLE_CALL returns true if this node has the VARIABLE_CALL flag.
func (*IndexOperatorWriteNode) ToJSON ¶ added in v1.1.0
func (n *IndexOperatorWriteNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type IndexOrWriteNode ¶
type IndexOrWriteNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Receiver Node `json:"receiver"` CallOperatorLoc *Location `json:"call_operator_loc"` OpeningLoc Location `json:"opening_loc"` Arguments *ArgumentsNode `json:"arguments"` ClosingLoc Location `json:"closing_loc"` Block *BlockArgumentNode `json:"block"` OperatorLoc Location `json:"operator_loc"` Value Node `json:"value"` // contains filtered or unexported fields }
Represents the use of the `||=` operator on a call to `[]`.
foo.bar[baz] ||= value ^^^^^^^^^^^^^^^^^^^^^^
func NewIndexOrWriteNode ¶
func NewIndexOrWriteNode(nodeID int, location Location, flags uint32, receiver Node, call_operator_loc *Location, opening_loc Location, arguments *ArgumentsNode, closing_loc Location, block *BlockArgumentNode, operator_loc Location, value Node) *IndexOrWriteNode
NewIndexOrWriteNode creates a new IndexOrWriteNode.
func (*IndexOrWriteNode) Accept ¶
func (n *IndexOrWriteNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*IndexOrWriteNode) ChildNodes ¶ added in v1.1.0
func (n *IndexOrWriteNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*IndexOrWriteNode) CompactChildNodes ¶ added in v1.1.0
func (n *IndexOrWriteNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*IndexOrWriteNode) GetLocation ¶ added in v1.1.0
func (n *IndexOrWriteNode) GetLocation() Location
GetLocation returns the location of this node.
func (*IndexOrWriteNode) GetNodeID ¶ added in v1.1.0
func (n *IndexOrWriteNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*IndexOrWriteNode) IsATTRIBUTE_WRITE ¶ added in v1.1.0
func (n *IndexOrWriteNode) IsATTRIBUTE_WRITE() bool
IsATTRIBUTE_WRITE returns true if this node has the ATTRIBUTE_WRITE flag.
func (*IndexOrWriteNode) IsIGNORE_VISIBILITY ¶ added in v1.1.0
func (n *IndexOrWriteNode) IsIGNORE_VISIBILITY() bool
IsIGNORE_VISIBILITY returns true if this node has the IGNORE_VISIBILITY flag.
func (*IndexOrWriteNode) IsSAFE_NAVIGATION ¶ added in v1.1.0
func (n *IndexOrWriteNode) IsSAFE_NAVIGATION() bool
IsSAFE_NAVIGATION returns true if this node has the SAFE_NAVIGATION flag.
func (*IndexOrWriteNode) IsVARIABLE_CALL ¶ added in v1.1.0
func (n *IndexOrWriteNode) IsVARIABLE_CALL() bool
IsVARIABLE_CALL returns true if this node has the VARIABLE_CALL flag.
func (*IndexOrWriteNode) ToJSON ¶ added in v1.1.0
func (n *IndexOrWriteNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type IndexTargetNode ¶
type IndexTargetNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Receiver Node `json:"receiver"` OpeningLoc Location `json:"opening_loc"` Arguments *ArgumentsNode `json:"arguments"` ClosingLoc Location `json:"closing_loc"` Block *BlockArgumentNode `json:"block"` // contains filtered or unexported fields }
Represents assigning to an index.
foo[bar], = 1 ^^^^^^^^ begin rescue => foo[bar] ^^^^^^^^ end for foo[bar] in baz do end ^^^^^^^^
func NewIndexTargetNode ¶
func NewIndexTargetNode(nodeID int, location Location, flags uint32, receiver Node, opening_loc Location, arguments *ArgumentsNode, closing_loc Location, block *BlockArgumentNode) *IndexTargetNode
NewIndexTargetNode creates a new IndexTargetNode.
func (*IndexTargetNode) Accept ¶
func (n *IndexTargetNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*IndexTargetNode) ChildNodes ¶ added in v1.1.0
func (n *IndexTargetNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*IndexTargetNode) CompactChildNodes ¶ added in v1.1.0
func (n *IndexTargetNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*IndexTargetNode) GetLocation ¶ added in v1.1.0
func (n *IndexTargetNode) GetLocation() Location
GetLocation returns the location of this node.
func (*IndexTargetNode) GetNodeID ¶ added in v1.1.0
func (n *IndexTargetNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*IndexTargetNode) IsATTRIBUTE_WRITE ¶ added in v1.1.0
func (n *IndexTargetNode) IsATTRIBUTE_WRITE() bool
IsATTRIBUTE_WRITE returns true if this node has the ATTRIBUTE_WRITE flag.
func (*IndexTargetNode) IsIGNORE_VISIBILITY ¶ added in v1.1.0
func (n *IndexTargetNode) IsIGNORE_VISIBILITY() bool
IsIGNORE_VISIBILITY returns true if this node has the IGNORE_VISIBILITY flag.
func (*IndexTargetNode) IsSAFE_NAVIGATION ¶ added in v1.1.0
func (n *IndexTargetNode) IsSAFE_NAVIGATION() bool
IsSAFE_NAVIGATION returns true if this node has the SAFE_NAVIGATION flag.
func (*IndexTargetNode) IsVARIABLE_CALL ¶ added in v1.1.0
func (n *IndexTargetNode) IsVARIABLE_CALL() bool
IsVARIABLE_CALL returns true if this node has the VARIABLE_CALL flag.
func (*IndexTargetNode) ToJSON ¶ added in v1.1.0
func (n *IndexTargetNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type InstanceVariableAndWriteNode ¶
type InstanceVariableAndWriteNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Name string `json:"name"` NameLoc Location `json:"name_loc"` OperatorLoc Location `json:"operator_loc"` Value Node `json:"value"` // contains filtered or unexported fields }
Represents the use of the `&&=` operator for assignment to an instance variable.
@target &&= value ^^^^^^^^^^^^^^^^^
func NewInstanceVariableAndWriteNode ¶
func NewInstanceVariableAndWriteNode(nodeID int, location Location, flags uint32, name string, name_loc Location, operator_loc Location, value Node) *InstanceVariableAndWriteNode
NewInstanceVariableAndWriteNode creates a new InstanceVariableAndWriteNode.
func (*InstanceVariableAndWriteNode) Accept ¶
func (n *InstanceVariableAndWriteNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*InstanceVariableAndWriteNode) ChildNodes ¶ added in v1.1.0
func (n *InstanceVariableAndWriteNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*InstanceVariableAndWriteNode) CompactChildNodes ¶ added in v1.1.0
func (n *InstanceVariableAndWriteNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*InstanceVariableAndWriteNode) GetLocation ¶ added in v1.1.0
func (n *InstanceVariableAndWriteNode) GetLocation() Location
GetLocation returns the location of this node.
func (*InstanceVariableAndWriteNode) GetNodeID ¶ added in v1.1.0
func (n *InstanceVariableAndWriteNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*InstanceVariableAndWriteNode) ToJSON ¶ added in v1.1.0
func (n *InstanceVariableAndWriteNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type InstanceVariableOperatorWriteNode ¶
type InstanceVariableOperatorWriteNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Name string `json:"name"` NameLoc Location `json:"name_loc"` BinaryOperatorLoc Location `json:"binary_operator_loc"` Value Node `json:"value"` BinaryOperator string `json:"binary_operator"` // contains filtered or unexported fields }
Represents assigning to an instance variable using an operator that isn't `=`.
@target += value ^^^^^^^^^^^^^^^^
func NewInstanceVariableOperatorWriteNode ¶
func NewInstanceVariableOperatorWriteNode(nodeID int, location Location, flags uint32, name string, name_loc Location, binary_operator_loc Location, value Node, binary_operator string) *InstanceVariableOperatorWriteNode
NewInstanceVariableOperatorWriteNode creates a new InstanceVariableOperatorWriteNode.
func (*InstanceVariableOperatorWriteNode) Accept ¶
func (n *InstanceVariableOperatorWriteNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*InstanceVariableOperatorWriteNode) ChildNodes ¶ added in v1.1.0
func (n *InstanceVariableOperatorWriteNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*InstanceVariableOperatorWriteNode) CompactChildNodes ¶ added in v1.1.0
func (n *InstanceVariableOperatorWriteNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*InstanceVariableOperatorWriteNode) GetLocation ¶ added in v1.1.0
func (n *InstanceVariableOperatorWriteNode) GetLocation() Location
GetLocation returns the location of this node.
func (*InstanceVariableOperatorWriteNode) GetNodeID ¶ added in v1.1.0
func (n *InstanceVariableOperatorWriteNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*InstanceVariableOperatorWriteNode) ToJSON ¶ added in v1.1.0
func (n *InstanceVariableOperatorWriteNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type InstanceVariableOrWriteNode ¶
type InstanceVariableOrWriteNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Name string `json:"name"` NameLoc Location `json:"name_loc"` OperatorLoc Location `json:"operator_loc"` Value Node `json:"value"` // contains filtered or unexported fields }
Represents the use of the `||=` operator for assignment to an instance variable.
@target ||= value ^^^^^^^^^^^^^^^^^
func NewInstanceVariableOrWriteNode ¶
func NewInstanceVariableOrWriteNode(nodeID int, location Location, flags uint32, name string, name_loc Location, operator_loc Location, value Node) *InstanceVariableOrWriteNode
NewInstanceVariableOrWriteNode creates a new InstanceVariableOrWriteNode.
func (*InstanceVariableOrWriteNode) Accept ¶
func (n *InstanceVariableOrWriteNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*InstanceVariableOrWriteNode) ChildNodes ¶ added in v1.1.0
func (n *InstanceVariableOrWriteNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*InstanceVariableOrWriteNode) CompactChildNodes ¶ added in v1.1.0
func (n *InstanceVariableOrWriteNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*InstanceVariableOrWriteNode) GetLocation ¶ added in v1.1.0
func (n *InstanceVariableOrWriteNode) GetLocation() Location
GetLocation returns the location of this node.
func (*InstanceVariableOrWriteNode) GetNodeID ¶ added in v1.1.0
func (n *InstanceVariableOrWriteNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*InstanceVariableOrWriteNode) ToJSON ¶ added in v1.1.0
func (n *InstanceVariableOrWriteNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type InstanceVariableReadNode ¶
type InstanceVariableReadNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Name string `json:"name"` // contains filtered or unexported fields }
Represents referencing an instance variable.
@foo ^^^^
func NewInstanceVariableReadNode ¶
func NewInstanceVariableReadNode(nodeID int, location Location, flags uint32, name string) *InstanceVariableReadNode
NewInstanceVariableReadNode creates a new InstanceVariableReadNode.
func (*InstanceVariableReadNode) Accept ¶
func (n *InstanceVariableReadNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*InstanceVariableReadNode) ChildNodes ¶ added in v1.1.0
func (n *InstanceVariableReadNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*InstanceVariableReadNode) CompactChildNodes ¶ added in v1.1.0
func (n *InstanceVariableReadNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*InstanceVariableReadNode) GetLocation ¶ added in v1.1.0
func (n *InstanceVariableReadNode) GetLocation() Location
GetLocation returns the location of this node.
func (*InstanceVariableReadNode) GetNodeID ¶ added in v1.1.0
func (n *InstanceVariableReadNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*InstanceVariableReadNode) ToJSON ¶ added in v1.1.0
func (n *InstanceVariableReadNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type InstanceVariableTargetNode ¶
type InstanceVariableTargetNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Name string `json:"name"` // contains filtered or unexported fields }
Represents writing to an instance variable in a context that doesn't have an explicit value.
@foo, @bar = baz ^^^^ ^^^^
func NewInstanceVariableTargetNode ¶
func NewInstanceVariableTargetNode(nodeID int, location Location, flags uint32, name string) *InstanceVariableTargetNode
NewInstanceVariableTargetNode creates a new InstanceVariableTargetNode.
func (*InstanceVariableTargetNode) Accept ¶
func (n *InstanceVariableTargetNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*InstanceVariableTargetNode) ChildNodes ¶ added in v1.1.0
func (n *InstanceVariableTargetNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*InstanceVariableTargetNode) CompactChildNodes ¶ added in v1.1.0
func (n *InstanceVariableTargetNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*InstanceVariableTargetNode) GetLocation ¶ added in v1.1.0
func (n *InstanceVariableTargetNode) GetLocation() Location
GetLocation returns the location of this node.
func (*InstanceVariableTargetNode) GetNodeID ¶ added in v1.1.0
func (n *InstanceVariableTargetNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*InstanceVariableTargetNode) ToJSON ¶ added in v1.1.0
func (n *InstanceVariableTargetNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type InstanceVariableWriteNode ¶
type InstanceVariableWriteNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Name string `json:"name"` NameLoc Location `json:"name_loc"` Value Node `json:"value"` OperatorLoc Location `json:"operator_loc"` // contains filtered or unexported fields }
Represents writing to an instance variable.
@foo = 1 ^^^^^^^^
func NewInstanceVariableWriteNode ¶
func NewInstanceVariableWriteNode(nodeID int, location Location, flags uint32, name string, name_loc Location, value Node, operator_loc Location) *InstanceVariableWriteNode
NewInstanceVariableWriteNode creates a new InstanceVariableWriteNode.
func (*InstanceVariableWriteNode) Accept ¶
func (n *InstanceVariableWriteNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*InstanceVariableWriteNode) ChildNodes ¶ added in v1.1.0
func (n *InstanceVariableWriteNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*InstanceVariableWriteNode) CompactChildNodes ¶ added in v1.1.0
func (n *InstanceVariableWriteNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*InstanceVariableWriteNode) GetLocation ¶ added in v1.1.0
func (n *InstanceVariableWriteNode) GetLocation() Location
GetLocation returns the location of this node.
func (*InstanceVariableWriteNode) GetNodeID ¶ added in v1.1.0
func (n *InstanceVariableWriteNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*InstanceVariableWriteNode) ToJSON ¶ added in v1.1.0
func (n *InstanceVariableWriteNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type IntegerNode ¶
type IntegerNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Value int64 `json:"value"` // contains filtered or unexported fields }
Represents an integer number literal.
1 ^
func NewIntegerNode ¶
func NewIntegerNode(nodeID int, location Location, flags uint32, value int64) *IntegerNode
NewIntegerNode creates a new IntegerNode.
func (*IntegerNode) Accept ¶
func (n *IntegerNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*IntegerNode) ChildNodes ¶ added in v1.1.0
func (n *IntegerNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*IntegerNode) CompactChildNodes ¶ added in v1.1.0
func (n *IntegerNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*IntegerNode) GetLocation ¶ added in v1.1.0
func (n *IntegerNode) GetLocation() Location
GetLocation returns the location of this node.
func (*IntegerNode) GetNodeID ¶ added in v1.1.0
func (n *IntegerNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*IntegerNode) IsBINARY ¶ added in v1.1.0
func (n *IntegerNode) IsBINARY() bool
IsBINARY returns true if this node has the BINARY flag.
func (*IntegerNode) IsDECIMAL ¶ added in v1.1.0
func (n *IntegerNode) IsDECIMAL() bool
IsDECIMAL returns true if this node has the DECIMAL flag.
func (*IntegerNode) IsHEXADECIMAL ¶ added in v1.1.0
func (n *IntegerNode) IsHEXADECIMAL() bool
IsHEXADECIMAL returns true if this node has the HEXADECIMAL flag.
func (*IntegerNode) IsOCTAL ¶ added in v1.1.0
func (n *IntegerNode) IsOCTAL() bool
IsOCTAL returns true if this node has the OCTAL flag.
func (*IntegerNode) ToJSON ¶ added in v1.1.0
func (n *IntegerNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type InterpolatedMatchLastLineNode ¶
type InterpolatedMatchLastLineNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` OpeningLoc Location `json:"opening_loc"` Parts []Node `json:"parts"` ClosingLoc Location `json:"closing_loc"` // contains filtered or unexported fields }
Represents a regular expression literal that contains interpolation that is being used in the predicate of a conditional to implicitly match against the last line read by an IO object.
if /foo #{bar} baz/ then end ^^^^^^^^^^^^^^^^
func NewInterpolatedMatchLastLineNode ¶
func NewInterpolatedMatchLastLineNode(nodeID int, location Location, flags uint32, opening_loc Location, parts []Node, closing_loc Location) *InterpolatedMatchLastLineNode
NewInterpolatedMatchLastLineNode creates a new InterpolatedMatchLastLineNode.
func (*InterpolatedMatchLastLineNode) Accept ¶
func (n *InterpolatedMatchLastLineNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*InterpolatedMatchLastLineNode) ChildNodes ¶ added in v1.1.0
func (n *InterpolatedMatchLastLineNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*InterpolatedMatchLastLineNode) CompactChildNodes ¶ added in v1.1.0
func (n *InterpolatedMatchLastLineNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*InterpolatedMatchLastLineNode) GetLocation ¶ added in v1.1.0
func (n *InterpolatedMatchLastLineNode) GetLocation() Location
GetLocation returns the location of this node.
func (*InterpolatedMatchLastLineNode) GetNodeID ¶ added in v1.1.0
func (n *InterpolatedMatchLastLineNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*InterpolatedMatchLastLineNode) IsASCII_8BIT ¶ added in v1.1.0
func (n *InterpolatedMatchLastLineNode) IsASCII_8BIT() bool
IsASCII_8BIT returns true if this node has the ASCII_8BIT flag.
func (*InterpolatedMatchLastLineNode) IsEUC_JP ¶ added in v1.1.0
func (n *InterpolatedMatchLastLineNode) IsEUC_JP() bool
IsEUC_JP returns true if this node has the EUC_JP flag.
func (*InterpolatedMatchLastLineNode) IsEXTENDED ¶ added in v1.1.0
func (n *InterpolatedMatchLastLineNode) IsEXTENDED() bool
IsEXTENDED returns true if this node has the EXTENDED flag.
func (*InterpolatedMatchLastLineNode) IsFORCED_BINARY_ENCODING ¶ added in v1.1.0
func (n *InterpolatedMatchLastLineNode) IsFORCED_BINARY_ENCODING() bool
IsFORCED_BINARY_ENCODING returns true if this node has the FORCED_BINARY_ENCODING flag.
func (*InterpolatedMatchLastLineNode) IsFORCED_US_ASCII_ENCODING ¶ added in v1.1.0
func (n *InterpolatedMatchLastLineNode) IsFORCED_US_ASCII_ENCODING() bool
IsFORCED_US_ASCII_ENCODING returns true if this node has the FORCED_US_ASCII_ENCODING flag.
func (*InterpolatedMatchLastLineNode) IsFORCED_UTF8_ENCODING ¶ added in v1.1.0
func (n *InterpolatedMatchLastLineNode) IsFORCED_UTF8_ENCODING() bool
IsFORCED_UTF8_ENCODING returns true if this node has the FORCED_UTF8_ENCODING flag.
func (*InterpolatedMatchLastLineNode) IsIGNORE_CASE ¶ added in v1.1.0
func (n *InterpolatedMatchLastLineNode) IsIGNORE_CASE() bool
IsIGNORE_CASE returns true if this node has the IGNORE_CASE flag.
func (*InterpolatedMatchLastLineNode) IsMULTI_LINE ¶ added in v1.1.0
func (n *InterpolatedMatchLastLineNode) IsMULTI_LINE() bool
IsMULTI_LINE returns true if this node has the MULTI_LINE flag.
func (*InterpolatedMatchLastLineNode) IsONCE ¶ added in v1.1.0
func (n *InterpolatedMatchLastLineNode) IsONCE() bool
IsONCE returns true if this node has the ONCE flag.
func (*InterpolatedMatchLastLineNode) IsUTF_8 ¶ added in v1.1.0
func (n *InterpolatedMatchLastLineNode) IsUTF_8() bool
IsUTF_8 returns true if this node has the UTF_8 flag.
func (*InterpolatedMatchLastLineNode) IsWINDOWS_31J ¶ added in v1.1.0
func (n *InterpolatedMatchLastLineNode) IsWINDOWS_31J() bool
IsWINDOWS_31J returns true if this node has the WINDOWS_31J flag.
func (*InterpolatedMatchLastLineNode) ToJSON ¶ added in v1.1.0
func (n *InterpolatedMatchLastLineNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type InterpolatedRegularExpressionNode ¶
type InterpolatedRegularExpressionNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` OpeningLoc Location `json:"opening_loc"` Parts []Node `json:"parts"` ClosingLoc Location `json:"closing_loc"` // contains filtered or unexported fields }
Represents a regular expression literal that contains interpolation.
/foo #{bar} baz/ ^^^^^^^^^^^^^^^^
func NewInterpolatedRegularExpressionNode ¶
func NewInterpolatedRegularExpressionNode(nodeID int, location Location, flags uint32, opening_loc Location, parts []Node, closing_loc Location) *InterpolatedRegularExpressionNode
NewInterpolatedRegularExpressionNode creates a new InterpolatedRegularExpressionNode.
func (*InterpolatedRegularExpressionNode) Accept ¶
func (n *InterpolatedRegularExpressionNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*InterpolatedRegularExpressionNode) ChildNodes ¶ added in v1.1.0
func (n *InterpolatedRegularExpressionNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*InterpolatedRegularExpressionNode) CompactChildNodes ¶ added in v1.1.0
func (n *InterpolatedRegularExpressionNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*InterpolatedRegularExpressionNode) GetLocation ¶ added in v1.1.0
func (n *InterpolatedRegularExpressionNode) GetLocation() Location
GetLocation returns the location of this node.
func (*InterpolatedRegularExpressionNode) GetNodeID ¶ added in v1.1.0
func (n *InterpolatedRegularExpressionNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*InterpolatedRegularExpressionNode) IsASCII_8BIT ¶ added in v1.1.0
func (n *InterpolatedRegularExpressionNode) IsASCII_8BIT() bool
IsASCII_8BIT returns true if this node has the ASCII_8BIT flag.
func (*InterpolatedRegularExpressionNode) IsEUC_JP ¶ added in v1.1.0
func (n *InterpolatedRegularExpressionNode) IsEUC_JP() bool
IsEUC_JP returns true if this node has the EUC_JP flag.
func (*InterpolatedRegularExpressionNode) IsEXTENDED ¶ added in v1.1.0
func (n *InterpolatedRegularExpressionNode) IsEXTENDED() bool
IsEXTENDED returns true if this node has the EXTENDED flag.
func (*InterpolatedRegularExpressionNode) IsFORCED_BINARY_ENCODING ¶ added in v1.1.0
func (n *InterpolatedRegularExpressionNode) IsFORCED_BINARY_ENCODING() bool
IsFORCED_BINARY_ENCODING returns true if this node has the FORCED_BINARY_ENCODING flag.
func (*InterpolatedRegularExpressionNode) IsFORCED_US_ASCII_ENCODING ¶ added in v1.1.0
func (n *InterpolatedRegularExpressionNode) IsFORCED_US_ASCII_ENCODING() bool
IsFORCED_US_ASCII_ENCODING returns true if this node has the FORCED_US_ASCII_ENCODING flag.
func (*InterpolatedRegularExpressionNode) IsFORCED_UTF8_ENCODING ¶ added in v1.1.0
func (n *InterpolatedRegularExpressionNode) IsFORCED_UTF8_ENCODING() bool
IsFORCED_UTF8_ENCODING returns true if this node has the FORCED_UTF8_ENCODING flag.
func (*InterpolatedRegularExpressionNode) IsIGNORE_CASE ¶ added in v1.1.0
func (n *InterpolatedRegularExpressionNode) IsIGNORE_CASE() bool
IsIGNORE_CASE returns true if this node has the IGNORE_CASE flag.
func (*InterpolatedRegularExpressionNode) IsMULTI_LINE ¶ added in v1.1.0
func (n *InterpolatedRegularExpressionNode) IsMULTI_LINE() bool
IsMULTI_LINE returns true if this node has the MULTI_LINE flag.
func (*InterpolatedRegularExpressionNode) IsONCE ¶ added in v1.1.0
func (n *InterpolatedRegularExpressionNode) IsONCE() bool
IsONCE returns true if this node has the ONCE flag.
func (*InterpolatedRegularExpressionNode) IsUTF_8 ¶ added in v1.1.0
func (n *InterpolatedRegularExpressionNode) IsUTF_8() bool
IsUTF_8 returns true if this node has the UTF_8 flag.
func (*InterpolatedRegularExpressionNode) IsWINDOWS_31J ¶ added in v1.1.0
func (n *InterpolatedRegularExpressionNode) IsWINDOWS_31J() bool
IsWINDOWS_31J returns true if this node has the WINDOWS_31J flag.
func (*InterpolatedRegularExpressionNode) ToJSON ¶ added in v1.1.0
func (n *InterpolatedRegularExpressionNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type InterpolatedStringNode ¶
type InterpolatedStringNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` OpeningLoc *Location `json:"opening_loc"` Parts []Node `json:"parts"` ClosingLoc *Location `json:"closing_loc"` // contains filtered or unexported fields }
Represents a string literal that contains interpolation.
"foo #{bar} baz" ^^^^^^^^^^^^^^^^
func NewInterpolatedStringNode ¶
func NewInterpolatedStringNode(nodeID int, location Location, flags uint32, opening_loc *Location, parts []Node, closing_loc *Location) *InterpolatedStringNode
NewInterpolatedStringNode creates a new InterpolatedStringNode.
func (*InterpolatedStringNode) Accept ¶
func (n *InterpolatedStringNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*InterpolatedStringNode) ChildNodes ¶ added in v1.1.0
func (n *InterpolatedStringNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*InterpolatedStringNode) CompactChildNodes ¶ added in v1.1.0
func (n *InterpolatedStringNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*InterpolatedStringNode) GetLocation ¶ added in v1.1.0
func (n *InterpolatedStringNode) GetLocation() Location
GetLocation returns the location of this node.
func (*InterpolatedStringNode) GetNodeID ¶ added in v1.1.0
func (n *InterpolatedStringNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*InterpolatedStringNode) IsFROZEN ¶ added in v1.1.0
func (n *InterpolatedStringNode) IsFROZEN() bool
IsFROZEN returns true if this node has the FROZEN flag.
func (*InterpolatedStringNode) IsMUTABLE ¶ added in v1.1.0
func (n *InterpolatedStringNode) IsMUTABLE() bool
IsMUTABLE returns true if this node has the MUTABLE flag.
func (*InterpolatedStringNode) ToJSON ¶ added in v1.1.0
func (n *InterpolatedStringNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type InterpolatedSymbolNode ¶
type InterpolatedSymbolNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` OpeningLoc *Location `json:"opening_loc"` Parts []Node `json:"parts"` ClosingLoc *Location `json:"closing_loc"` // contains filtered or unexported fields }
Represents a symbol literal that contains interpolation.
:"foo #{bar} baz" ^^^^^^^^^^^^^^^^^
func NewInterpolatedSymbolNode ¶
func NewInterpolatedSymbolNode(nodeID int, location Location, flags uint32, opening_loc *Location, parts []Node, closing_loc *Location) *InterpolatedSymbolNode
NewInterpolatedSymbolNode creates a new InterpolatedSymbolNode.
func (*InterpolatedSymbolNode) Accept ¶
func (n *InterpolatedSymbolNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*InterpolatedSymbolNode) ChildNodes ¶ added in v1.1.0
func (n *InterpolatedSymbolNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*InterpolatedSymbolNode) CompactChildNodes ¶ added in v1.1.0
func (n *InterpolatedSymbolNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*InterpolatedSymbolNode) GetLocation ¶ added in v1.1.0
func (n *InterpolatedSymbolNode) GetLocation() Location
GetLocation returns the location of this node.
func (*InterpolatedSymbolNode) GetNodeID ¶ added in v1.1.0
func (n *InterpolatedSymbolNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*InterpolatedSymbolNode) ToJSON ¶ added in v1.1.0
func (n *InterpolatedSymbolNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type InterpolatedXStringNode ¶
type InterpolatedXStringNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` OpeningLoc Location `json:"opening_loc"` Parts []Node `json:"parts"` ClosingLoc Location `json:"closing_loc"` // contains filtered or unexported fields }
Represents an xstring literal that contains interpolation.
`foo #{bar} baz` ^^^^^^^^^^^^^^^^
func NewInterpolatedXStringNode ¶
func NewInterpolatedXStringNode(nodeID int, location Location, flags uint32, opening_loc Location, parts []Node, closing_loc Location) *InterpolatedXStringNode
NewInterpolatedXStringNode creates a new InterpolatedXStringNode.
func (*InterpolatedXStringNode) Accept ¶
func (n *InterpolatedXStringNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*InterpolatedXStringNode) ChildNodes ¶ added in v1.1.0
func (n *InterpolatedXStringNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*InterpolatedXStringNode) CompactChildNodes ¶ added in v1.1.0
func (n *InterpolatedXStringNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*InterpolatedXStringNode) GetLocation ¶ added in v1.1.0
func (n *InterpolatedXStringNode) GetLocation() Location
GetLocation returns the location of this node.
func (*InterpolatedXStringNode) GetNodeID ¶ added in v1.1.0
func (n *InterpolatedXStringNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*InterpolatedXStringNode) ToJSON ¶ added in v1.1.0
func (n *InterpolatedXStringNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type ItLocalVariableReadNode ¶ added in v1.1.0
type ItLocalVariableReadNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` // contains filtered or unexported fields }
Represents reading from the implicit `it` local variable.
-> { it } ^^
func NewItLocalVariableReadNode ¶ added in v1.1.0
func NewItLocalVariableReadNode(nodeID int, location Location, flags uint32) *ItLocalVariableReadNode
NewItLocalVariableReadNode creates a new ItLocalVariableReadNode.
func (*ItLocalVariableReadNode) Accept ¶ added in v1.1.0
func (n *ItLocalVariableReadNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*ItLocalVariableReadNode) ChildNodes ¶ added in v1.1.0
func (n *ItLocalVariableReadNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*ItLocalVariableReadNode) CompactChildNodes ¶ added in v1.1.0
func (n *ItLocalVariableReadNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*ItLocalVariableReadNode) GetLocation ¶ added in v1.1.0
func (n *ItLocalVariableReadNode) GetLocation() Location
GetLocation returns the location of this node.
func (*ItLocalVariableReadNode) GetNodeID ¶ added in v1.1.0
func (n *ItLocalVariableReadNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*ItLocalVariableReadNode) ToJSON ¶ added in v1.1.0
func (n *ItLocalVariableReadNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type ItParametersNode ¶
type ItParametersNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` // contains filtered or unexported fields }
Represents an implicit set of parameters through the use of the `it` keyword within a block or lambda.
-> { it + it } ^^^^^^^^^^^^^^
func NewItParametersNode ¶
func NewItParametersNode(nodeID int, location Location, flags uint32) *ItParametersNode
NewItParametersNode creates a new ItParametersNode.
func (*ItParametersNode) Accept ¶
func (n *ItParametersNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*ItParametersNode) ChildNodes ¶ added in v1.1.0
func (n *ItParametersNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*ItParametersNode) CompactChildNodes ¶ added in v1.1.0
func (n *ItParametersNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*ItParametersNode) GetLocation ¶ added in v1.1.0
func (n *ItParametersNode) GetLocation() Location
GetLocation returns the location of this node.
func (*ItParametersNode) GetNodeID ¶ added in v1.1.0
func (n *ItParametersNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*ItParametersNode) ToJSON ¶ added in v1.1.0
func (n *ItParametersNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type KeywordHashNode ¶
type KeywordHashNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Elements []Node `json:"elements"` // contains filtered or unexported fields }
Represents a hash literal without opening and closing braces.
foo(a: b) ^^^^
func NewKeywordHashNode ¶
func NewKeywordHashNode(nodeID int, location Location, flags uint32, elements []Node) *KeywordHashNode
NewKeywordHashNode creates a new KeywordHashNode.
func (*KeywordHashNode) Accept ¶
func (n *KeywordHashNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*KeywordHashNode) ChildNodes ¶ added in v1.1.0
func (n *KeywordHashNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*KeywordHashNode) CompactChildNodes ¶ added in v1.1.0
func (n *KeywordHashNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*KeywordHashNode) GetLocation ¶ added in v1.1.0
func (n *KeywordHashNode) GetLocation() Location
GetLocation returns the location of this node.
func (*KeywordHashNode) GetNodeID ¶ added in v1.1.0
func (n *KeywordHashNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*KeywordHashNode) IsSYMBOL_KEYS ¶ added in v1.1.0
func (n *KeywordHashNode) IsSYMBOL_KEYS() bool
IsSYMBOL_KEYS returns true if this node has the SYMBOL_KEYS flag.
func (*KeywordHashNode) ToJSON ¶ added in v1.1.0
func (n *KeywordHashNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type KeywordRestParameterNode ¶
type KeywordRestParameterNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Name *string `json:"name"` NameLoc *Location `json:"name_loc"` OperatorLoc Location `json:"operator_loc"` // contains filtered or unexported fields }
Represents a keyword rest parameter to a method, block, or lambda definition.
def a(**b) ^^^ end
func NewKeywordRestParameterNode ¶
func NewKeywordRestParameterNode(nodeID int, location Location, flags uint32, name *string, name_loc *Location, operator_loc Location) *KeywordRestParameterNode
NewKeywordRestParameterNode creates a new KeywordRestParameterNode.
func (*KeywordRestParameterNode) Accept ¶
func (n *KeywordRestParameterNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*KeywordRestParameterNode) ChildNodes ¶ added in v1.1.0
func (n *KeywordRestParameterNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*KeywordRestParameterNode) CompactChildNodes ¶ added in v1.1.0
func (n *KeywordRestParameterNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*KeywordRestParameterNode) GetLocation ¶ added in v1.1.0
func (n *KeywordRestParameterNode) GetLocation() Location
GetLocation returns the location of this node.
func (*KeywordRestParameterNode) GetNodeID ¶ added in v1.1.0
func (n *KeywordRestParameterNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*KeywordRestParameterNode) IsREPEATED_PARAMETER ¶ added in v1.1.0
func (n *KeywordRestParameterNode) IsREPEATED_PARAMETER() bool
IsREPEATED_PARAMETER returns true if this node has the REPEATED_PARAMETER flag.
func (*KeywordRestParameterNode) ToJSON ¶ added in v1.1.0
func (n *KeywordRestParameterNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type LambdaNode ¶
type LambdaNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Locals []string `json:"locals"` OperatorLoc Location `json:"operator_loc"` OpeningLoc Location `json:"opening_loc"` ClosingLoc Location `json:"closing_loc"` Parameters Node `json:"parameters"` Body Node `json:"body"` // contains filtered or unexported fields }
Represents using a lambda literal (not the lambda method call).
->(value) { value * 2 } ^^^^^^^^^^^^^^^^^^^^^^^
func NewLambdaNode ¶
func NewLambdaNode(nodeID int, location Location, flags uint32, locals []string, operator_loc Location, opening_loc Location, closing_loc Location, parameters Node, body Node) *LambdaNode
NewLambdaNode creates a new LambdaNode.
func (*LambdaNode) Accept ¶
func (n *LambdaNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*LambdaNode) ChildNodes ¶ added in v1.1.0
func (n *LambdaNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*LambdaNode) CompactChildNodes ¶ added in v1.1.0
func (n *LambdaNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*LambdaNode) GetLocation ¶ added in v1.1.0
func (n *LambdaNode) GetLocation() Location
GetLocation returns the location of this node.
func (*LambdaNode) GetNodeID ¶ added in v1.1.0
func (n *LambdaNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*LambdaNode) ToJSON ¶ added in v1.1.0
func (n *LambdaNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type LocalVariableAndWriteNode ¶
type LocalVariableAndWriteNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` NameLoc Location `json:"name_loc"` OperatorLoc Location `json:"operator_loc"` Value Node `json:"value"` Name string `json:"name"` Depth uint32 `json:"depth"` // contains filtered or unexported fields }
Represents the use of the `&&=` operator for assignment to a local variable.
target &&= value ^^^^^^^^^^^^^^^^
func NewLocalVariableAndWriteNode ¶
func NewLocalVariableAndWriteNode(nodeID int, location Location, flags uint32, name_loc Location, operator_loc Location, value Node, name string, depth uint32) *LocalVariableAndWriteNode
NewLocalVariableAndWriteNode creates a new LocalVariableAndWriteNode.
func (*LocalVariableAndWriteNode) Accept ¶
func (n *LocalVariableAndWriteNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*LocalVariableAndWriteNode) ChildNodes ¶ added in v1.1.0
func (n *LocalVariableAndWriteNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*LocalVariableAndWriteNode) CompactChildNodes ¶ added in v1.1.0
func (n *LocalVariableAndWriteNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*LocalVariableAndWriteNode) GetLocation ¶ added in v1.1.0
func (n *LocalVariableAndWriteNode) GetLocation() Location
GetLocation returns the location of this node.
func (*LocalVariableAndWriteNode) GetNodeID ¶ added in v1.1.0
func (n *LocalVariableAndWriteNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*LocalVariableAndWriteNode) ToJSON ¶ added in v1.1.0
func (n *LocalVariableAndWriteNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type LocalVariableOperatorWriteNode ¶
type LocalVariableOperatorWriteNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` NameLoc Location `json:"name_loc"` BinaryOperatorLoc Location `json:"binary_operator_loc"` Value Node `json:"value"` Name string `json:"name"` BinaryOperator string `json:"binary_operator"` Depth uint32 `json:"depth"` // contains filtered or unexported fields }
Represents assigning to a local variable using an operator that isn't `=`.
target += value ^^^^^^^^^^^^^^^
func NewLocalVariableOperatorWriteNode ¶
func NewLocalVariableOperatorWriteNode(nodeID int, location Location, flags uint32, name_loc Location, binary_operator_loc Location, value Node, name string, binary_operator string, depth uint32) *LocalVariableOperatorWriteNode
NewLocalVariableOperatorWriteNode creates a new LocalVariableOperatorWriteNode.
func (*LocalVariableOperatorWriteNode) Accept ¶
func (n *LocalVariableOperatorWriteNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*LocalVariableOperatorWriteNode) ChildNodes ¶ added in v1.1.0
func (n *LocalVariableOperatorWriteNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*LocalVariableOperatorWriteNode) CompactChildNodes ¶ added in v1.1.0
func (n *LocalVariableOperatorWriteNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*LocalVariableOperatorWriteNode) GetLocation ¶ added in v1.1.0
func (n *LocalVariableOperatorWriteNode) GetLocation() Location
GetLocation returns the location of this node.
func (*LocalVariableOperatorWriteNode) GetNodeID ¶ added in v1.1.0
func (n *LocalVariableOperatorWriteNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*LocalVariableOperatorWriteNode) ToJSON ¶ added in v1.1.0
func (n *LocalVariableOperatorWriteNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type LocalVariableOrWriteNode ¶
type LocalVariableOrWriteNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` NameLoc Location `json:"name_loc"` OperatorLoc Location `json:"operator_loc"` Value Node `json:"value"` Name string `json:"name"` Depth uint32 `json:"depth"` // contains filtered or unexported fields }
Represents the use of the `||=` operator for assignment to a local variable.
target ||= value ^^^^^^^^^^^^^^^^
func NewLocalVariableOrWriteNode ¶
func NewLocalVariableOrWriteNode(nodeID int, location Location, flags uint32, name_loc Location, operator_loc Location, value Node, name string, depth uint32) *LocalVariableOrWriteNode
NewLocalVariableOrWriteNode creates a new LocalVariableOrWriteNode.
func (*LocalVariableOrWriteNode) Accept ¶
func (n *LocalVariableOrWriteNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*LocalVariableOrWriteNode) ChildNodes ¶ added in v1.1.0
func (n *LocalVariableOrWriteNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*LocalVariableOrWriteNode) CompactChildNodes ¶ added in v1.1.0
func (n *LocalVariableOrWriteNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*LocalVariableOrWriteNode) GetLocation ¶ added in v1.1.0
func (n *LocalVariableOrWriteNode) GetLocation() Location
GetLocation returns the location of this node.
func (*LocalVariableOrWriteNode) GetNodeID ¶ added in v1.1.0
func (n *LocalVariableOrWriteNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*LocalVariableOrWriteNode) ToJSON ¶ added in v1.1.0
func (n *LocalVariableOrWriteNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type LocalVariableReadNode ¶
type LocalVariableReadNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Name string `json:"name"` Depth uint32 `json:"depth"` // contains filtered or unexported fields }
Represents reading a local variable. Note that this requires that a local variable of the same name has already been written to in the same scope, otherwise it is parsed as a method call.
foo ^^^
func NewLocalVariableReadNode ¶
func NewLocalVariableReadNode(nodeID int, location Location, flags uint32, name string, depth uint32) *LocalVariableReadNode
NewLocalVariableReadNode creates a new LocalVariableReadNode.
func (*LocalVariableReadNode) Accept ¶
func (n *LocalVariableReadNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*LocalVariableReadNode) ChildNodes ¶ added in v1.1.0
func (n *LocalVariableReadNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*LocalVariableReadNode) CompactChildNodes ¶ added in v1.1.0
func (n *LocalVariableReadNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*LocalVariableReadNode) GetLocation ¶ added in v1.1.0
func (n *LocalVariableReadNode) GetLocation() Location
GetLocation returns the location of this node.
func (*LocalVariableReadNode) GetNodeID ¶ added in v1.1.0
func (n *LocalVariableReadNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*LocalVariableReadNode) ToJSON ¶ added in v1.1.0
func (n *LocalVariableReadNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type LocalVariableTargetNode ¶
type LocalVariableTargetNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Name string `json:"name"` Depth uint32 `json:"depth"` // contains filtered or unexported fields }
Represents writing to a local variable in a context that doesn't have an explicit value.
foo, bar = baz ^^^ ^^^
func NewLocalVariableTargetNode ¶
func NewLocalVariableTargetNode(nodeID int, location Location, flags uint32, name string, depth uint32) *LocalVariableTargetNode
NewLocalVariableTargetNode creates a new LocalVariableTargetNode.
func (*LocalVariableTargetNode) Accept ¶
func (n *LocalVariableTargetNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*LocalVariableTargetNode) ChildNodes ¶ added in v1.1.0
func (n *LocalVariableTargetNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*LocalVariableTargetNode) CompactChildNodes ¶ added in v1.1.0
func (n *LocalVariableTargetNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*LocalVariableTargetNode) GetLocation ¶ added in v1.1.0
func (n *LocalVariableTargetNode) GetLocation() Location
GetLocation returns the location of this node.
func (*LocalVariableTargetNode) GetNodeID ¶ added in v1.1.0
func (n *LocalVariableTargetNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*LocalVariableTargetNode) ToJSON ¶ added in v1.1.0
func (n *LocalVariableTargetNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type LocalVariableWriteNode ¶
type LocalVariableWriteNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Name string `json:"name"` Depth uint32 `json:"depth"` NameLoc Location `json:"name_loc"` Value Node `json:"value"` OperatorLoc Location `json:"operator_loc"` // contains filtered or unexported fields }
Represents writing to a local variable.
foo = 1 ^^^^^^^
func NewLocalVariableWriteNode ¶
func NewLocalVariableWriteNode(nodeID int, location Location, flags uint32, name string, depth uint32, name_loc Location, value Node, operator_loc Location) *LocalVariableWriteNode
NewLocalVariableWriteNode creates a new LocalVariableWriteNode.
func (*LocalVariableWriteNode) Accept ¶
func (n *LocalVariableWriteNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*LocalVariableWriteNode) ChildNodes ¶ added in v1.1.0
func (n *LocalVariableWriteNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*LocalVariableWriteNode) CompactChildNodes ¶ added in v1.1.0
func (n *LocalVariableWriteNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*LocalVariableWriteNode) GetLocation ¶ added in v1.1.0
func (n *LocalVariableWriteNode) GetLocation() Location
GetLocation returns the location of this node.
func (*LocalVariableWriteNode) GetNodeID ¶ added in v1.1.0
func (n *LocalVariableWriteNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*LocalVariableWriteNode) ToJSON ¶ added in v1.1.0
func (n *LocalVariableWriteNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type MagicComment ¶
type MagicComment struct { StartLocation Location `json:"startLocation"` EndLocation Location `json:"endLocation"` }
MagicComment represents a magic comment in the source code.
type MatchLastLineNode ¶
type MatchLastLineNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` OpeningLoc Location `json:"opening_loc"` ContentLoc Location `json:"content_loc"` ClosingLoc Location `json:"closing_loc"` Unescaped RubyString `json:"unescaped"` // contains filtered or unexported fields }
Represents a regular expression literal used in the predicate of a conditional to implicitly match against the last line read by an IO object.
if /foo/i then end ^^^^^^
func NewMatchLastLineNode ¶
func NewMatchLastLineNode(nodeID int, location Location, flags uint32, opening_loc Location, content_loc Location, closing_loc Location, unescaped RubyString) *MatchLastLineNode
NewMatchLastLineNode creates a new MatchLastLineNode.
func (*MatchLastLineNode) Accept ¶
func (n *MatchLastLineNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*MatchLastLineNode) ChildNodes ¶ added in v1.1.0
func (n *MatchLastLineNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*MatchLastLineNode) CompactChildNodes ¶ added in v1.1.0
func (n *MatchLastLineNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*MatchLastLineNode) GetLocation ¶ added in v1.1.0
func (n *MatchLastLineNode) GetLocation() Location
GetLocation returns the location of this node.
func (*MatchLastLineNode) GetNodeID ¶ added in v1.1.0
func (n *MatchLastLineNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*MatchLastLineNode) IsASCII_8BIT ¶ added in v1.1.0
func (n *MatchLastLineNode) IsASCII_8BIT() bool
IsASCII_8BIT returns true if this node has the ASCII_8BIT flag.
func (*MatchLastLineNode) IsEUC_JP ¶ added in v1.1.0
func (n *MatchLastLineNode) IsEUC_JP() bool
IsEUC_JP returns true if this node has the EUC_JP flag.
func (*MatchLastLineNode) IsEXTENDED ¶ added in v1.1.0
func (n *MatchLastLineNode) IsEXTENDED() bool
IsEXTENDED returns true if this node has the EXTENDED flag.
func (*MatchLastLineNode) IsFORCED_BINARY_ENCODING ¶ added in v1.1.0
func (n *MatchLastLineNode) IsFORCED_BINARY_ENCODING() bool
IsFORCED_BINARY_ENCODING returns true if this node has the FORCED_BINARY_ENCODING flag.
func (*MatchLastLineNode) IsFORCED_US_ASCII_ENCODING ¶ added in v1.1.0
func (n *MatchLastLineNode) IsFORCED_US_ASCII_ENCODING() bool
IsFORCED_US_ASCII_ENCODING returns true if this node has the FORCED_US_ASCII_ENCODING flag.
func (*MatchLastLineNode) IsFORCED_UTF8_ENCODING ¶ added in v1.1.0
func (n *MatchLastLineNode) IsFORCED_UTF8_ENCODING() bool
IsFORCED_UTF8_ENCODING returns true if this node has the FORCED_UTF8_ENCODING flag.
func (*MatchLastLineNode) IsIGNORE_CASE ¶ added in v1.1.0
func (n *MatchLastLineNode) IsIGNORE_CASE() bool
IsIGNORE_CASE returns true if this node has the IGNORE_CASE flag.
func (*MatchLastLineNode) IsMULTI_LINE ¶ added in v1.1.0
func (n *MatchLastLineNode) IsMULTI_LINE() bool
IsMULTI_LINE returns true if this node has the MULTI_LINE flag.
func (*MatchLastLineNode) IsONCE ¶ added in v1.1.0
func (n *MatchLastLineNode) IsONCE() bool
IsONCE returns true if this node has the ONCE flag.
func (*MatchLastLineNode) IsUTF_8 ¶ added in v1.1.0
func (n *MatchLastLineNode) IsUTF_8() bool
IsUTF_8 returns true if this node has the UTF_8 flag.
func (*MatchLastLineNode) IsWINDOWS_31J ¶ added in v1.1.0
func (n *MatchLastLineNode) IsWINDOWS_31J() bool
IsWINDOWS_31J returns true if this node has the WINDOWS_31J flag.
func (*MatchLastLineNode) ToJSON ¶ added in v1.1.0
func (n *MatchLastLineNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type MatchPredicateNode ¶
type MatchPredicateNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Value Node `json:"value"` Pattern Node `json:"pattern"` OperatorLoc Location `json:"operator_loc"` // contains filtered or unexported fields }
Represents the use of the modifier `in` operator.
foo in bar ^^^^^^^^^^
func NewMatchPredicateNode ¶
func NewMatchPredicateNode(nodeID int, location Location, flags uint32, value Node, pattern Node, operator_loc Location) *MatchPredicateNode
NewMatchPredicateNode creates a new MatchPredicateNode.
func (*MatchPredicateNode) Accept ¶
func (n *MatchPredicateNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*MatchPredicateNode) ChildNodes ¶ added in v1.1.0
func (n *MatchPredicateNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*MatchPredicateNode) CompactChildNodes ¶ added in v1.1.0
func (n *MatchPredicateNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*MatchPredicateNode) GetLocation ¶ added in v1.1.0
func (n *MatchPredicateNode) GetLocation() Location
GetLocation returns the location of this node.
func (*MatchPredicateNode) GetNodeID ¶ added in v1.1.0
func (n *MatchPredicateNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*MatchPredicateNode) ToJSON ¶ added in v1.1.0
func (n *MatchPredicateNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type MatchRequiredNode ¶
type MatchRequiredNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Value Node `json:"value"` Pattern Node `json:"pattern"` OperatorLoc Location `json:"operator_loc"` // contains filtered or unexported fields }
Represents the use of the `=>` operator.
foo => bar ^^^^^^^^^^
func NewMatchRequiredNode ¶
func NewMatchRequiredNode(nodeID int, location Location, flags uint32, value Node, pattern Node, operator_loc Location) *MatchRequiredNode
NewMatchRequiredNode creates a new MatchRequiredNode.
func (*MatchRequiredNode) Accept ¶
func (n *MatchRequiredNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*MatchRequiredNode) ChildNodes ¶ added in v1.1.0
func (n *MatchRequiredNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*MatchRequiredNode) CompactChildNodes ¶ added in v1.1.0
func (n *MatchRequiredNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*MatchRequiredNode) GetLocation ¶ added in v1.1.0
func (n *MatchRequiredNode) GetLocation() Location
GetLocation returns the location of this node.
func (*MatchRequiredNode) GetNodeID ¶ added in v1.1.0
func (n *MatchRequiredNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*MatchRequiredNode) ToJSON ¶ added in v1.1.0
func (n *MatchRequiredNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type MatchWriteNode ¶
type MatchWriteNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Call *CallNode `json:"call"` Targets []Node `json:"targets"` // contains filtered or unexported fields }
Represents writing local variables using a regular expression match with named capture groups.
/(?<foo>bar)/ =~ baz ^^^^^^^^^^^^^^^^^^^^
func NewMatchWriteNode ¶
func NewMatchWriteNode(nodeID int, location Location, flags uint32, call *CallNode, targets []Node) *MatchWriteNode
NewMatchWriteNode creates a new MatchWriteNode.
func (*MatchWriteNode) Accept ¶
func (n *MatchWriteNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*MatchWriteNode) ChildNodes ¶ added in v1.1.0
func (n *MatchWriteNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*MatchWriteNode) CompactChildNodes ¶ added in v1.1.0
func (n *MatchWriteNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*MatchWriteNode) GetLocation ¶ added in v1.1.0
func (n *MatchWriteNode) GetLocation() Location
GetLocation returns the location of this node.
func (*MatchWriteNode) GetNodeID ¶ added in v1.1.0
func (n *MatchWriteNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*MatchWriteNode) ToJSON ¶ added in v1.1.0
func (n *MatchWriteNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type MissingNode ¶
type MissingNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` // contains filtered or unexported fields }
Represents a node that is missing from the source and results in a syntax error.
func NewMissingNode ¶
func NewMissingNode(nodeID int, location Location, flags uint32) *MissingNode
NewMissingNode creates a new MissingNode.
func (*MissingNode) Accept ¶
func (n *MissingNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*MissingNode) ChildNodes ¶ added in v1.1.0
func (n *MissingNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*MissingNode) CompactChildNodes ¶ added in v1.1.0
func (n *MissingNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*MissingNode) GetLocation ¶ added in v1.1.0
func (n *MissingNode) GetLocation() Location
GetLocation returns the location of this node.
func (*MissingNode) GetNodeID ¶ added in v1.1.0
func (n *MissingNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*MissingNode) ToJSON ¶ added in v1.1.0
func (n *MissingNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type ModuleNode ¶
type ModuleNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Locals []string `json:"locals"` ModuleKeywordLoc Location `json:"module_keyword_loc"` ConstantPath Node `json:"constant_path"` Body Node `json:"body"` EndKeywordLoc Location `json:"end_keyword_loc"` Name string `json:"name"` // contains filtered or unexported fields }
Represents a module declaration involving the `module` keyword.
module Foo end ^^^^^^^^^^^^^^
func NewModuleNode ¶
func NewModuleNode(nodeID int, location Location, flags uint32, locals []string, module_keyword_loc Location, constant_path Node, body Node, end_keyword_loc Location, name string) *ModuleNode
NewModuleNode creates a new ModuleNode.
func (*ModuleNode) Accept ¶
func (n *ModuleNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*ModuleNode) ChildNodes ¶ added in v1.1.0
func (n *ModuleNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*ModuleNode) CompactChildNodes ¶ added in v1.1.0
func (n *ModuleNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*ModuleNode) GetLocation ¶ added in v1.1.0
func (n *ModuleNode) GetLocation() Location
GetLocation returns the location of this node.
func (*ModuleNode) GetNodeID ¶ added in v1.1.0
func (n *ModuleNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*ModuleNode) ToJSON ¶ added in v1.1.0
func (n *ModuleNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type MultiTargetNode ¶
type MultiTargetNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Lefts []Node `json:"lefts"` Rest Node `json:"rest"` Rights []Node `json:"rights"` LparenLoc *Location `json:"lparen_loc"` RparenLoc *Location `json:"rparen_loc"` // contains filtered or unexported fields }
Represents a multi-target expression.
a, (b, c) = 1, 2, 3 ^^^^^^
This can be a part of `MultiWriteNode` as above, or the target of a `for` loop
for a, b in [[1, 2], [3, 4]] ^^^^
func NewMultiTargetNode ¶
func NewMultiTargetNode(nodeID int, location Location, flags uint32, lefts []Node, rest Node, rights []Node, lparen_loc *Location, rparen_loc *Location) *MultiTargetNode
NewMultiTargetNode creates a new MultiTargetNode.
func (*MultiTargetNode) Accept ¶
func (n *MultiTargetNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*MultiTargetNode) ChildNodes ¶ added in v1.1.0
func (n *MultiTargetNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*MultiTargetNode) CompactChildNodes ¶ added in v1.1.0
func (n *MultiTargetNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*MultiTargetNode) GetLocation ¶ added in v1.1.0
func (n *MultiTargetNode) GetLocation() Location
GetLocation returns the location of this node.
func (*MultiTargetNode) GetNodeID ¶ added in v1.1.0
func (n *MultiTargetNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*MultiTargetNode) ToJSON ¶ added in v1.1.0
func (n *MultiTargetNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type MultiWriteNode ¶
type MultiWriteNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Lefts []Node `json:"lefts"` Rest Node `json:"rest"` Rights []Node `json:"rights"` LparenLoc *Location `json:"lparen_loc"` RparenLoc *Location `json:"rparen_loc"` OperatorLoc Location `json:"operator_loc"` Value Node `json:"value"` // contains filtered or unexported fields }
Represents a write to a multi-target expression.
a, b, c = 1, 2, 3 ^^^^^^^^^^^^^^^^^
func NewMultiWriteNode ¶
func NewMultiWriteNode(nodeID int, location Location, flags uint32, lefts []Node, rest Node, rights []Node, lparen_loc *Location, rparen_loc *Location, operator_loc Location, value Node) *MultiWriteNode
NewMultiWriteNode creates a new MultiWriteNode.
func (*MultiWriteNode) Accept ¶
func (n *MultiWriteNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*MultiWriteNode) ChildNodes ¶ added in v1.1.0
func (n *MultiWriteNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*MultiWriteNode) CompactChildNodes ¶ added in v1.1.0
func (n *MultiWriteNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*MultiWriteNode) GetLocation ¶ added in v1.1.0
func (n *MultiWriteNode) GetLocation() Location
GetLocation returns the location of this node.
func (*MultiWriteNode) GetNodeID ¶ added in v1.1.0
func (n *MultiWriteNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*MultiWriteNode) ToJSON ¶ added in v1.1.0
func (n *MultiWriteNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type NextNode ¶
type NextNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Arguments *ArgumentsNode `json:"arguments"` KeywordLoc Location `json:"keyword_loc"` // contains filtered or unexported fields }
Represents the use of the `next` keyword.
next 1 ^^^^^^
func NewNextNode ¶
func NewNextNode(nodeID int, location Location, flags uint32, arguments *ArgumentsNode, keyword_loc Location) *NextNode
NewNextNode creates a new NextNode.
func (*NextNode) ChildNodes ¶ added in v1.1.0
ChildNodes returns all child nodes of the current node.
func (*NextNode) CompactChildNodes ¶ added in v1.1.0
CompactChildNodes returns all non-nil child nodes.
func (*NextNode) GetLocation ¶ added in v1.1.0
GetLocation returns the location of this node.
type NilNode ¶
type NilNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` // contains filtered or unexported fields }
Represents the use of the `nil` keyword.
nil ^^^
func NewNilNode ¶
NewNilNode creates a new NilNode.
func (*NilNode) ChildNodes ¶ added in v1.1.0
ChildNodes returns all child nodes of the current node.
func (*NilNode) CompactChildNodes ¶ added in v1.1.0
CompactChildNodes returns all non-nil child nodes.
func (*NilNode) GetLocation ¶ added in v1.1.0
GetLocation returns the location of this node.
type NoKeywordsParameterNode ¶
type NoKeywordsParameterNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` OperatorLoc Location `json:"operator_loc"` KeywordLoc Location `json:"keyword_loc"` // contains filtered or unexported fields }
Represents the use of `**nil` inside method arguments.
def a(**nil) ^^^^^ end
func NewNoKeywordsParameterNode ¶
func NewNoKeywordsParameterNode(nodeID int, location Location, flags uint32, operator_loc Location, keyword_loc Location) *NoKeywordsParameterNode
NewNoKeywordsParameterNode creates a new NoKeywordsParameterNode.
func (*NoKeywordsParameterNode) Accept ¶
func (n *NoKeywordsParameterNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*NoKeywordsParameterNode) ChildNodes ¶ added in v1.1.0
func (n *NoKeywordsParameterNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*NoKeywordsParameterNode) CompactChildNodes ¶ added in v1.1.0
func (n *NoKeywordsParameterNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*NoKeywordsParameterNode) GetLocation ¶ added in v1.1.0
func (n *NoKeywordsParameterNode) GetLocation() Location
GetLocation returns the location of this node.
func (*NoKeywordsParameterNode) GetNodeID ¶ added in v1.1.0
func (n *NoKeywordsParameterNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*NoKeywordsParameterNode) ToJSON ¶ added in v1.1.0
func (n *NoKeywordsParameterNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type Node ¶
type Node interface { Accept(visitor Visitor) ChildNodes() []Node CompactChildNodes() []Node ToJSON() map[string]interface{} GetLocation() Location GetNodeID() int }
Node represents a generic node in the tree.
type NullLogger ¶ added in v1.1.0
type NullLogger struct {
Logger
}
func NewNullLogger ¶ added in v1.1.0
func NewNullLogger() *NullLogger
func (*NullLogger) Debug ¶ added in v1.1.0
func (l *NullLogger) Debug(message string, args ...any)
type NumberedParametersNode ¶
type NumberedParametersNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Maximum uint8 `json:"maximum"` // contains filtered or unexported fields }
Represents an implicit set of parameters through the use of numbered parameters within a block or lambda.
-> { _1 + _2 } ^^^^^^^^^^^^^^
func NewNumberedParametersNode ¶
func NewNumberedParametersNode(nodeID int, location Location, flags uint32, maximum uint8) *NumberedParametersNode
NewNumberedParametersNode creates a new NumberedParametersNode.
func (*NumberedParametersNode) Accept ¶
func (n *NumberedParametersNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*NumberedParametersNode) ChildNodes ¶ added in v1.1.0
func (n *NumberedParametersNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*NumberedParametersNode) CompactChildNodes ¶ added in v1.1.0
func (n *NumberedParametersNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*NumberedParametersNode) GetLocation ¶ added in v1.1.0
func (n *NumberedParametersNode) GetLocation() Location
GetLocation returns the location of this node.
func (*NumberedParametersNode) GetNodeID ¶ added in v1.1.0
func (n *NumberedParametersNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*NumberedParametersNode) ToJSON ¶ added in v1.1.0
func (n *NumberedParametersNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type NumberedReferenceReadNode ¶
type NumberedReferenceReadNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Number uint32 `json:"number"` // contains filtered or unexported fields }
Represents reading a numbered reference to a capture in the previous match.
$1 ^^
func NewNumberedReferenceReadNode ¶
func NewNumberedReferenceReadNode(nodeID int, location Location, flags uint32, number uint32) *NumberedReferenceReadNode
NewNumberedReferenceReadNode creates a new NumberedReferenceReadNode.
func (*NumberedReferenceReadNode) Accept ¶
func (n *NumberedReferenceReadNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*NumberedReferenceReadNode) ChildNodes ¶ added in v1.1.0
func (n *NumberedReferenceReadNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*NumberedReferenceReadNode) CompactChildNodes ¶ added in v1.1.0
func (n *NumberedReferenceReadNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*NumberedReferenceReadNode) GetLocation ¶ added in v1.1.0
func (n *NumberedReferenceReadNode) GetLocation() Location
GetLocation returns the location of this node.
func (*NumberedReferenceReadNode) GetNodeID ¶ added in v1.1.0
func (n *NumberedReferenceReadNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*NumberedReferenceReadNode) ToJSON ¶ added in v1.1.0
func (n *NumberedReferenceReadNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type OptionalKeywordParameterNode ¶
type OptionalKeywordParameterNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Name string `json:"name"` NameLoc Location `json:"name_loc"` Value Node `json:"value"` // contains filtered or unexported fields }
Represents an optional keyword parameter to a method, block, or lambda definition.
def a(b: 1) ^^^^ end
func NewOptionalKeywordParameterNode ¶
func NewOptionalKeywordParameterNode(nodeID int, location Location, flags uint32, name string, name_loc Location, value Node) *OptionalKeywordParameterNode
NewOptionalKeywordParameterNode creates a new OptionalKeywordParameterNode.
func (*OptionalKeywordParameterNode) Accept ¶
func (n *OptionalKeywordParameterNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*OptionalKeywordParameterNode) ChildNodes ¶ added in v1.1.0
func (n *OptionalKeywordParameterNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*OptionalKeywordParameterNode) CompactChildNodes ¶ added in v1.1.0
func (n *OptionalKeywordParameterNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*OptionalKeywordParameterNode) GetLocation ¶ added in v1.1.0
func (n *OptionalKeywordParameterNode) GetLocation() Location
GetLocation returns the location of this node.
func (*OptionalKeywordParameterNode) GetNodeID ¶ added in v1.1.0
func (n *OptionalKeywordParameterNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*OptionalKeywordParameterNode) IsREPEATED_PARAMETER ¶ added in v1.1.0
func (n *OptionalKeywordParameterNode) IsREPEATED_PARAMETER() bool
IsREPEATED_PARAMETER returns true if this node has the REPEATED_PARAMETER flag.
func (*OptionalKeywordParameterNode) ToJSON ¶ added in v1.1.0
func (n *OptionalKeywordParameterNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type OptionalParameterNode ¶
type OptionalParameterNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Name string `json:"name"` NameLoc Location `json:"name_loc"` OperatorLoc Location `json:"operator_loc"` Value Node `json:"value"` // contains filtered or unexported fields }
Represents an optional parameter to a method, block, or lambda definition.
def a(b = 1) ^^^^^ end
func NewOptionalParameterNode ¶
func NewOptionalParameterNode(nodeID int, location Location, flags uint32, name string, name_loc Location, operator_loc Location, value Node) *OptionalParameterNode
NewOptionalParameterNode creates a new OptionalParameterNode.
func (*OptionalParameterNode) Accept ¶
func (n *OptionalParameterNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*OptionalParameterNode) ChildNodes ¶ added in v1.1.0
func (n *OptionalParameterNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*OptionalParameterNode) CompactChildNodes ¶ added in v1.1.0
func (n *OptionalParameterNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*OptionalParameterNode) GetLocation ¶ added in v1.1.0
func (n *OptionalParameterNode) GetLocation() Location
GetLocation returns the location of this node.
func (*OptionalParameterNode) GetNodeID ¶ added in v1.1.0
func (n *OptionalParameterNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*OptionalParameterNode) IsREPEATED_PARAMETER ¶ added in v1.1.0
func (n *OptionalParameterNode) IsREPEATED_PARAMETER() bool
IsREPEATED_PARAMETER returns true if this node has the REPEATED_PARAMETER flag.
func (*OptionalParameterNode) ToJSON ¶ added in v1.1.0
func (n *OptionalParameterNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type OrNode ¶
type OrNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Left Node `json:"left"` Right Node `json:"right"` OperatorLoc Location `json:"operator_loc"` // contains filtered or unexported fields }
Represents the use of the `||` operator or the `or` keyword.
left or right ^^^^^^^^^^^^^
func NewOrNode ¶
func NewOrNode(nodeID int, location Location, flags uint32, left Node, right Node, operator_loc Location) *OrNode
NewOrNode creates a new OrNode.
func (*OrNode) ChildNodes ¶ added in v1.1.0
ChildNodes returns all child nodes of the current node.
func (*OrNode) CompactChildNodes ¶ added in v1.1.0
CompactChildNodes returns all non-nil child nodes.
func (*OrNode) GetLocation ¶ added in v1.1.0
GetLocation returns the location of this node.
type ParametersNode ¶
type ParametersNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Requireds []Node `json:"requireds"` Optionals []Node `json:"optionals"` Rest Node `json:"rest"` Posts []Node `json:"posts"` Keywords []Node `json:"keywords"` KeywordRest Node `json:"keyword_rest"` Block *BlockParameterNode `json:"block"` // contains filtered or unexported fields }
Represents the list of parameters on a method, block, or lambda definition.
def a(b, c, d) ^^^^^^^ end
func NewParametersNode ¶
func NewParametersNode(nodeID int, location Location, flags uint32, requireds []Node, optionals []Node, rest Node, posts []Node, keywords []Node, keyword_rest Node, block *BlockParameterNode) *ParametersNode
NewParametersNode creates a new ParametersNode.
func (*ParametersNode) Accept ¶
func (n *ParametersNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*ParametersNode) ChildNodes ¶ added in v1.1.0
func (n *ParametersNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*ParametersNode) CompactChildNodes ¶ added in v1.1.0
func (n *ParametersNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*ParametersNode) GetLocation ¶ added in v1.1.0
func (n *ParametersNode) GetLocation() Location
GetLocation returns the location of this node.
func (*ParametersNode) GetNodeID ¶ added in v1.1.0
func (n *ParametersNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*ParametersNode) ToJSON ¶ added in v1.1.0
func (n *ParametersNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type ParenthesesNode ¶
type ParenthesesNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Body Node `json:"body"` OpeningLoc Location `json:"opening_loc"` ClosingLoc Location `json:"closing_loc"` // contains filtered or unexported fields }
Represents a parenthesized expression
(10 + 34) ^^^^^^^^^
func NewParenthesesNode ¶
func NewParenthesesNode(nodeID int, location Location, flags uint32, body Node, opening_loc Location, closing_loc Location) *ParenthesesNode
NewParenthesesNode creates a new ParenthesesNode.
func (*ParenthesesNode) Accept ¶
func (n *ParenthesesNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*ParenthesesNode) ChildNodes ¶ added in v1.1.0
func (n *ParenthesesNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*ParenthesesNode) CompactChildNodes ¶ added in v1.1.0
func (n *ParenthesesNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*ParenthesesNode) GetLocation ¶ added in v1.1.0
func (n *ParenthesesNode) GetLocation() Location
GetLocation returns the location of this node.
func (*ParenthesesNode) GetNodeID ¶ added in v1.1.0
func (n *ParenthesesNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*ParenthesesNode) IsMULTIPLE_STATEMENTS ¶ added in v1.1.0
func (n *ParenthesesNode) IsMULTIPLE_STATEMENTS() bool
IsMULTIPLE_STATEMENTS returns true if this node has the MULTIPLE_STATEMENTS flag.
func (*ParenthesesNode) ToJSON ¶ added in v1.1.0
func (n *ParenthesesNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type ParseError ¶ added in v1.1.0
type ParseError struct { Type string `json:"type"` Message string `json:"message"` Location Location `json:"location"` Level string `json:"level"` }
ParseError represents an error in the source code.
type ParseResult ¶
type ParseResult struct { Value *ProgramNode `json:"value"` Comments []Comment `json:"comments"` MagicComments []MagicComment `json:"magicComments"` DataLoc *Location `json:"dataLoc"` Errors []ParseError `json:"errors"` Warnings []ParseWarning `json:"warnings"` }
ParseResult represents the result of parsing the source code.
func Deserialize ¶ added in v1.1.0
func Deserialize(source, array []byte) (*ParseResult, error)
Deserialize accepts two byte slices, one for the source and one for the serialized format. Returns the AST corresponding to the serialized form.
type ParseWarning ¶ added in v1.1.0
type ParseWarning struct { Type string `json:"type"` Message string `json:"message"` Location Location `json:"location"` Level string `json:"level"` }
ParseWarning represents a warning in the source code.
type ParserOption ¶ added in v1.1.0
type ParserOption func(*Parser)
func WithCommandLine ¶ added in v1.1.0
func WithCommandLine(commandLine []CommandLine) ParserOption
func WithEncoding ¶ added in v1.1.0
func WithEncoding(encoding string) ParserOption
func WithEncodingLocked ¶ added in v1.1.0
func WithEncodingLocked(encodingLocked bool) ParserOption
func WithFilePath ¶ added in v1.1.0
func WithFilePath(filepath string) ParserOption
func WithFrozenStringLiteral ¶ added in v1.1.0
func WithFrozenStringLiteral(frozenStringLiteral bool) ParserOption
func WithLine ¶ added in v1.1.0
func WithLine(line int) ParserOption
func WithLogger ¶ added in v1.1.0
func WithLogger(logger Logger) ParserOption
func WithMainScript ¶ added in v1.1.0
func WithMainScript(mainScript bool) ParserOption
func WithPartialScript ¶ added in v1.1.0
func WithPartialScript(partialScript bool) ParserOption
func WithScopes ¶ added in v1.1.0
func WithScopes(scopes [][][]byte) ParserOption
func WithVersion ¶ added in v1.1.0
func WithVersion(version SyntaxVersion) ParserOption
type PinnedExpressionNode ¶
type PinnedExpressionNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Expression Node `json:"expression"` OperatorLoc Location `json:"operator_loc"` LparenLoc Location `json:"lparen_loc"` RparenLoc Location `json:"rparen_loc"` // contains filtered or unexported fields }
Represents the use of the `^` operator for pinning an expression in a pattern matching expression.
foo in ^(bar) ^^^^^^
func NewPinnedExpressionNode ¶
func NewPinnedExpressionNode(nodeID int, location Location, flags uint32, expression Node, operator_loc Location, lparen_loc Location, rparen_loc Location) *PinnedExpressionNode
NewPinnedExpressionNode creates a new PinnedExpressionNode.
func (*PinnedExpressionNode) Accept ¶
func (n *PinnedExpressionNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*PinnedExpressionNode) ChildNodes ¶ added in v1.1.0
func (n *PinnedExpressionNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*PinnedExpressionNode) CompactChildNodes ¶ added in v1.1.0
func (n *PinnedExpressionNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*PinnedExpressionNode) GetLocation ¶ added in v1.1.0
func (n *PinnedExpressionNode) GetLocation() Location
GetLocation returns the location of this node.
func (*PinnedExpressionNode) GetNodeID ¶ added in v1.1.0
func (n *PinnedExpressionNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*PinnedExpressionNode) ToJSON ¶ added in v1.1.0
func (n *PinnedExpressionNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type PinnedVariableNode ¶
type PinnedVariableNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Variable Node `json:"variable"` OperatorLoc Location `json:"operator_loc"` // contains filtered or unexported fields }
Represents the use of the `^` operator for pinning a variable in a pattern matching expression.
foo in ^bar ^^^^
func NewPinnedVariableNode ¶
func NewPinnedVariableNode(nodeID int, location Location, flags uint32, variable Node, operator_loc Location) *PinnedVariableNode
NewPinnedVariableNode creates a new PinnedVariableNode.
func (*PinnedVariableNode) Accept ¶
func (n *PinnedVariableNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*PinnedVariableNode) ChildNodes ¶ added in v1.1.0
func (n *PinnedVariableNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*PinnedVariableNode) CompactChildNodes ¶ added in v1.1.0
func (n *PinnedVariableNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*PinnedVariableNode) GetLocation ¶ added in v1.1.0
func (n *PinnedVariableNode) GetLocation() Location
GetLocation returns the location of this node.
func (*PinnedVariableNode) GetNodeID ¶ added in v1.1.0
func (n *PinnedVariableNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*PinnedVariableNode) ToJSON ¶ added in v1.1.0
func (n *PinnedVariableNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type PostExecutionNode ¶
type PostExecutionNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Statements *StatementsNode `json:"statements"` KeywordLoc Location `json:"keyword_loc"` OpeningLoc Location `json:"opening_loc"` ClosingLoc Location `json:"closing_loc"` // contains filtered or unexported fields }
Represents the use of the `END` keyword.
END { foo } ^^^^^^^^^^^
func NewPostExecutionNode ¶
func NewPostExecutionNode(nodeID int, location Location, flags uint32, statements *StatementsNode, keyword_loc Location, opening_loc Location, closing_loc Location) *PostExecutionNode
NewPostExecutionNode creates a new PostExecutionNode.
func (*PostExecutionNode) Accept ¶
func (n *PostExecutionNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*PostExecutionNode) ChildNodes ¶ added in v1.1.0
func (n *PostExecutionNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*PostExecutionNode) CompactChildNodes ¶ added in v1.1.0
func (n *PostExecutionNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*PostExecutionNode) GetLocation ¶ added in v1.1.0
func (n *PostExecutionNode) GetLocation() Location
GetLocation returns the location of this node.
func (*PostExecutionNode) GetNodeID ¶ added in v1.1.0
func (n *PostExecutionNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*PostExecutionNode) ToJSON ¶ added in v1.1.0
func (n *PostExecutionNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type PreExecutionNode ¶
type PreExecutionNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Statements *StatementsNode `json:"statements"` KeywordLoc Location `json:"keyword_loc"` OpeningLoc Location `json:"opening_loc"` ClosingLoc Location `json:"closing_loc"` // contains filtered or unexported fields }
Represents the use of the `BEGIN` keyword.
BEGIN { foo } ^^^^^^^^^^^^^
func NewPreExecutionNode ¶
func NewPreExecutionNode(nodeID int, location Location, flags uint32, statements *StatementsNode, keyword_loc Location, opening_loc Location, closing_loc Location) *PreExecutionNode
NewPreExecutionNode creates a new PreExecutionNode.
func (*PreExecutionNode) Accept ¶
func (n *PreExecutionNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*PreExecutionNode) ChildNodes ¶ added in v1.1.0
func (n *PreExecutionNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*PreExecutionNode) CompactChildNodes ¶ added in v1.1.0
func (n *PreExecutionNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*PreExecutionNode) GetLocation ¶ added in v1.1.0
func (n *PreExecutionNode) GetLocation() Location
GetLocation returns the location of this node.
func (*PreExecutionNode) GetNodeID ¶ added in v1.1.0
func (n *PreExecutionNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*PreExecutionNode) ToJSON ¶ added in v1.1.0
func (n *PreExecutionNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type ProgramNode ¶
type ProgramNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Locals []string `json:"locals"` Statements *StatementsNode `json:"statements"` // contains filtered or unexported fields }
The top level node of any parse tree.
func NewProgramNode ¶
func NewProgramNode(nodeID int, location Location, flags uint32, locals []string, statements *StatementsNode) *ProgramNode
NewProgramNode creates a new ProgramNode.
func (*ProgramNode) Accept ¶
func (n *ProgramNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*ProgramNode) ChildNodes ¶ added in v1.1.0
func (n *ProgramNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*ProgramNode) CompactChildNodes ¶ added in v1.1.0
func (n *ProgramNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*ProgramNode) GetLocation ¶ added in v1.1.0
func (n *ProgramNode) GetLocation() Location
GetLocation returns the location of this node.
func (*ProgramNode) GetNodeID ¶ added in v1.1.0
func (n *ProgramNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*ProgramNode) ToJSON ¶ added in v1.1.0
func (n *ProgramNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type RangeNode ¶
type RangeNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Left Node `json:"left"` Right Node `json:"right"` OperatorLoc Location `json:"operator_loc"` // contains filtered or unexported fields }
Represents the use of the `..` or `...` operators.
1..2 ^^^^ c if a =~ /left/ ... b =~ /right/ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
func NewRangeNode ¶
func NewRangeNode(nodeID int, location Location, flags uint32, left Node, right Node, operator_loc Location) *RangeNode
NewRangeNode creates a new RangeNode.
func (*RangeNode) ChildNodes ¶ added in v1.1.0
ChildNodes returns all child nodes of the current node.
func (*RangeNode) CompactChildNodes ¶ added in v1.1.0
CompactChildNodes returns all non-nil child nodes.
func (*RangeNode) GetLocation ¶ added in v1.1.0
GetLocation returns the location of this node.
func (*RangeNode) IsEXCLUDE_END ¶ added in v1.1.0
IsEXCLUDE_END returns true if this node has the EXCLUDE_END flag.
type RationalNode ¶
type RationalNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Numerator int64 `json:"numerator"` Denominator int64 `json:"denominator"` // contains filtered or unexported fields }
Represents a rational number literal.
1.0r ^^^^
func NewRationalNode ¶
func NewRationalNode(nodeID int, location Location, flags uint32, numerator int64, denominator int64) *RationalNode
NewRationalNode creates a new RationalNode.
func (*RationalNode) Accept ¶
func (n *RationalNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*RationalNode) ChildNodes ¶ added in v1.1.0
func (n *RationalNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*RationalNode) CompactChildNodes ¶ added in v1.1.0
func (n *RationalNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*RationalNode) GetLocation ¶ added in v1.1.0
func (n *RationalNode) GetLocation() Location
GetLocation returns the location of this node.
func (*RationalNode) GetNodeID ¶ added in v1.1.0
func (n *RationalNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*RationalNode) IsBINARY ¶ added in v1.1.0
func (n *RationalNode) IsBINARY() bool
IsBINARY returns true if this node has the BINARY flag.
func (*RationalNode) IsDECIMAL ¶ added in v1.1.0
func (n *RationalNode) IsDECIMAL() bool
IsDECIMAL returns true if this node has the DECIMAL flag.
func (*RationalNode) IsHEXADECIMAL ¶ added in v1.1.0
func (n *RationalNode) IsHEXADECIMAL() bool
IsHEXADECIMAL returns true if this node has the HEXADECIMAL flag.
func (*RationalNode) IsOCTAL ¶ added in v1.1.0
func (n *RationalNode) IsOCTAL() bool
IsOCTAL returns true if this node has the OCTAL flag.
func (*RationalNode) ToJSON ¶ added in v1.1.0
func (n *RationalNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type RedoNode ¶
type RedoNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` // contains filtered or unexported fields }
Represents the use of the `redo` keyword.
redo ^^^^
func NewRedoNode ¶
NewRedoNode creates a new RedoNode.
func (*RedoNode) ChildNodes ¶ added in v1.1.0
ChildNodes returns all child nodes of the current node.
func (*RedoNode) CompactChildNodes ¶ added in v1.1.0
CompactChildNodes returns all non-nil child nodes.
func (*RedoNode) GetLocation ¶ added in v1.1.0
GetLocation returns the location of this node.
type RegularExpressionNode ¶
type RegularExpressionNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` OpeningLoc Location `json:"opening_loc"` ContentLoc Location `json:"content_loc"` ClosingLoc Location `json:"closing_loc"` Unescaped RubyString `json:"unescaped"` // contains filtered or unexported fields }
Represents a regular expression literal with no interpolation.
/foo/i ^^^^^^
func NewRegularExpressionNode ¶
func NewRegularExpressionNode(nodeID int, location Location, flags uint32, opening_loc Location, content_loc Location, closing_loc Location, unescaped RubyString) *RegularExpressionNode
NewRegularExpressionNode creates a new RegularExpressionNode.
func (*RegularExpressionNode) Accept ¶
func (n *RegularExpressionNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*RegularExpressionNode) ChildNodes ¶ added in v1.1.0
func (n *RegularExpressionNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*RegularExpressionNode) CompactChildNodes ¶ added in v1.1.0
func (n *RegularExpressionNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*RegularExpressionNode) GetLocation ¶ added in v1.1.0
func (n *RegularExpressionNode) GetLocation() Location
GetLocation returns the location of this node.
func (*RegularExpressionNode) GetNodeID ¶ added in v1.1.0
func (n *RegularExpressionNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*RegularExpressionNode) IsASCII_8BIT ¶ added in v1.1.0
func (n *RegularExpressionNode) IsASCII_8BIT() bool
IsASCII_8BIT returns true if this node has the ASCII_8BIT flag.
func (*RegularExpressionNode) IsEUC_JP ¶ added in v1.1.0
func (n *RegularExpressionNode) IsEUC_JP() bool
IsEUC_JP returns true if this node has the EUC_JP flag.
func (*RegularExpressionNode) IsEXTENDED ¶ added in v1.1.0
func (n *RegularExpressionNode) IsEXTENDED() bool
IsEXTENDED returns true if this node has the EXTENDED flag.
func (*RegularExpressionNode) IsFORCED_BINARY_ENCODING ¶ added in v1.1.0
func (n *RegularExpressionNode) IsFORCED_BINARY_ENCODING() bool
IsFORCED_BINARY_ENCODING returns true if this node has the FORCED_BINARY_ENCODING flag.
func (*RegularExpressionNode) IsFORCED_US_ASCII_ENCODING ¶ added in v1.1.0
func (n *RegularExpressionNode) IsFORCED_US_ASCII_ENCODING() bool
IsFORCED_US_ASCII_ENCODING returns true if this node has the FORCED_US_ASCII_ENCODING flag.
func (*RegularExpressionNode) IsFORCED_UTF8_ENCODING ¶ added in v1.1.0
func (n *RegularExpressionNode) IsFORCED_UTF8_ENCODING() bool
IsFORCED_UTF8_ENCODING returns true if this node has the FORCED_UTF8_ENCODING flag.
func (*RegularExpressionNode) IsIGNORE_CASE ¶ added in v1.1.0
func (n *RegularExpressionNode) IsIGNORE_CASE() bool
IsIGNORE_CASE returns true if this node has the IGNORE_CASE flag.
func (*RegularExpressionNode) IsMULTI_LINE ¶ added in v1.1.0
func (n *RegularExpressionNode) IsMULTI_LINE() bool
IsMULTI_LINE returns true if this node has the MULTI_LINE flag.
func (*RegularExpressionNode) IsONCE ¶ added in v1.1.0
func (n *RegularExpressionNode) IsONCE() bool
IsONCE returns true if this node has the ONCE flag.
func (*RegularExpressionNode) IsUTF_8 ¶ added in v1.1.0
func (n *RegularExpressionNode) IsUTF_8() bool
IsUTF_8 returns true if this node has the UTF_8 flag.
func (*RegularExpressionNode) IsWINDOWS_31J ¶ added in v1.1.0
func (n *RegularExpressionNode) IsWINDOWS_31J() bool
IsWINDOWS_31J returns true if this node has the WINDOWS_31J flag.
func (*RegularExpressionNode) ToJSON ¶ added in v1.1.0
func (n *RegularExpressionNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type RequiredKeywordParameterNode ¶
type RequiredKeywordParameterNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Name string `json:"name"` NameLoc Location `json:"name_loc"` // contains filtered or unexported fields }
Represents a required keyword parameter to a method, block, or lambda definition.
def a(b: ) ^^ end
func NewRequiredKeywordParameterNode ¶
func NewRequiredKeywordParameterNode(nodeID int, location Location, flags uint32, name string, name_loc Location) *RequiredKeywordParameterNode
NewRequiredKeywordParameterNode creates a new RequiredKeywordParameterNode.
func (*RequiredKeywordParameterNode) Accept ¶
func (n *RequiredKeywordParameterNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*RequiredKeywordParameterNode) ChildNodes ¶ added in v1.1.0
func (n *RequiredKeywordParameterNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*RequiredKeywordParameterNode) CompactChildNodes ¶ added in v1.1.0
func (n *RequiredKeywordParameterNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*RequiredKeywordParameterNode) GetLocation ¶ added in v1.1.0
func (n *RequiredKeywordParameterNode) GetLocation() Location
GetLocation returns the location of this node.
func (*RequiredKeywordParameterNode) GetNodeID ¶ added in v1.1.0
func (n *RequiredKeywordParameterNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*RequiredKeywordParameterNode) IsREPEATED_PARAMETER ¶ added in v1.1.0
func (n *RequiredKeywordParameterNode) IsREPEATED_PARAMETER() bool
IsREPEATED_PARAMETER returns true if this node has the REPEATED_PARAMETER flag.
func (*RequiredKeywordParameterNode) ToJSON ¶ added in v1.1.0
func (n *RequiredKeywordParameterNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type RequiredParameterNode ¶
type RequiredParameterNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Name string `json:"name"` // contains filtered or unexported fields }
Represents a required parameter to a method, block, or lambda definition.
def a(b) ^ end
func NewRequiredParameterNode ¶
func NewRequiredParameterNode(nodeID int, location Location, flags uint32, name string) *RequiredParameterNode
NewRequiredParameterNode creates a new RequiredParameterNode.
func (*RequiredParameterNode) Accept ¶
func (n *RequiredParameterNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*RequiredParameterNode) ChildNodes ¶ added in v1.1.0
func (n *RequiredParameterNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*RequiredParameterNode) CompactChildNodes ¶ added in v1.1.0
func (n *RequiredParameterNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*RequiredParameterNode) GetLocation ¶ added in v1.1.0
func (n *RequiredParameterNode) GetLocation() Location
GetLocation returns the location of this node.
func (*RequiredParameterNode) GetNodeID ¶ added in v1.1.0
func (n *RequiredParameterNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*RequiredParameterNode) IsREPEATED_PARAMETER ¶ added in v1.1.0
func (n *RequiredParameterNode) IsREPEATED_PARAMETER() bool
IsREPEATED_PARAMETER returns true if this node has the REPEATED_PARAMETER flag.
func (*RequiredParameterNode) ToJSON ¶ added in v1.1.0
func (n *RequiredParameterNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type RescueModifierNode ¶
type RescueModifierNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Expression Node `json:"expression"` KeywordLoc Location `json:"keyword_loc"` RescueExpression Node `json:"rescue_expression"` // contains filtered or unexported fields }
Represents an expression modified with a rescue.
foo rescue nil ^^^^^^^^^^^^^^
func NewRescueModifierNode ¶
func NewRescueModifierNode(nodeID int, location Location, flags uint32, expression Node, keyword_loc Location, rescue_expression Node) *RescueModifierNode
NewRescueModifierNode creates a new RescueModifierNode.
func (*RescueModifierNode) Accept ¶
func (n *RescueModifierNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*RescueModifierNode) ChildNodes ¶ added in v1.1.0
func (n *RescueModifierNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*RescueModifierNode) CompactChildNodes ¶ added in v1.1.0
func (n *RescueModifierNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*RescueModifierNode) GetLocation ¶ added in v1.1.0
func (n *RescueModifierNode) GetLocation() Location
GetLocation returns the location of this node.
func (*RescueModifierNode) GetNodeID ¶ added in v1.1.0
func (n *RescueModifierNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*RescueModifierNode) ToJSON ¶ added in v1.1.0
func (n *RescueModifierNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type RescueNode ¶
type RescueNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` KeywordLoc Location `json:"keyword_loc"` Exceptions []Node `json:"exceptions"` OperatorLoc *Location `json:"operator_loc"` Reference Node `json:"reference"` ThenKeywordLoc *Location `json:"then_keyword_loc"` Statements *StatementsNode `json:"statements"` Subsequent *RescueNode `json:"subsequent"` // contains filtered or unexported fields }
Represents a rescue statement.
begin rescue Foo, *splat, Bar => ex foo ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ end
`Foo, *splat, Bar` are in the `exceptions` field. `ex` is in the `reference` field.
func NewRescueNode ¶
func NewRescueNode(nodeID int, location Location, flags uint32, keyword_loc Location, exceptions []Node, operator_loc *Location, reference Node, then_keyword_loc *Location, statements *StatementsNode, subsequent *RescueNode) *RescueNode
NewRescueNode creates a new RescueNode.
func (*RescueNode) Accept ¶
func (n *RescueNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*RescueNode) ChildNodes ¶ added in v1.1.0
func (n *RescueNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*RescueNode) CompactChildNodes ¶ added in v1.1.0
func (n *RescueNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*RescueNode) GetLocation ¶ added in v1.1.0
func (n *RescueNode) GetLocation() Location
GetLocation returns the location of this node.
func (*RescueNode) GetNodeID ¶ added in v1.1.0
func (n *RescueNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*RescueNode) ToJSON ¶ added in v1.1.0
func (n *RescueNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type RestParameterNode ¶
type RestParameterNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Name *string `json:"name"` NameLoc *Location `json:"name_loc"` OperatorLoc Location `json:"operator_loc"` // contains filtered or unexported fields }
Represents a rest parameter to a method, block, or lambda definition.
def a(*b) ^^ end
func NewRestParameterNode ¶
func NewRestParameterNode(nodeID int, location Location, flags uint32, name *string, name_loc *Location, operator_loc Location) *RestParameterNode
NewRestParameterNode creates a new RestParameterNode.
func (*RestParameterNode) Accept ¶
func (n *RestParameterNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*RestParameterNode) ChildNodes ¶ added in v1.1.0
func (n *RestParameterNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*RestParameterNode) CompactChildNodes ¶ added in v1.1.0
func (n *RestParameterNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*RestParameterNode) GetLocation ¶ added in v1.1.0
func (n *RestParameterNode) GetLocation() Location
GetLocation returns the location of this node.
func (*RestParameterNode) GetNodeID ¶ added in v1.1.0
func (n *RestParameterNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*RestParameterNode) IsREPEATED_PARAMETER ¶ added in v1.1.0
func (n *RestParameterNode) IsREPEATED_PARAMETER() bool
IsREPEATED_PARAMETER returns true if this node has the REPEATED_PARAMETER flag.
func (*RestParameterNode) ToJSON ¶ added in v1.1.0
func (n *RestParameterNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type RetryNode ¶
type RetryNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` // contains filtered or unexported fields }
Represents the use of the `retry` keyword.
retry ^^^^^
func NewRetryNode ¶
NewRetryNode creates a new RetryNode.
func (*RetryNode) ChildNodes ¶ added in v1.1.0
ChildNodes returns all child nodes of the current node.
func (*RetryNode) CompactChildNodes ¶ added in v1.1.0
CompactChildNodes returns all non-nil child nodes.
func (*RetryNode) GetLocation ¶ added in v1.1.0
GetLocation returns the location of this node.
type ReturnNode ¶
type ReturnNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` KeywordLoc Location `json:"keyword_loc"` Arguments *ArgumentsNode `json:"arguments"` // contains filtered or unexported fields }
Represents the use of the `return` keyword.
return 1 ^^^^^^^^
func NewReturnNode ¶
func NewReturnNode(nodeID int, location Location, flags uint32, keyword_loc Location, arguments *ArgumentsNode) *ReturnNode
NewReturnNode creates a new ReturnNode.
func (*ReturnNode) Accept ¶
func (n *ReturnNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*ReturnNode) ChildNodes ¶ added in v1.1.0
func (n *ReturnNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*ReturnNode) CompactChildNodes ¶ added in v1.1.0
func (n *ReturnNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*ReturnNode) GetLocation ¶ added in v1.1.0
func (n *ReturnNode) GetLocation() Location
GetLocation returns the location of this node.
func (*ReturnNode) GetNodeID ¶ added in v1.1.0
func (n *ReturnNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*ReturnNode) ToJSON ¶ added in v1.1.0
func (n *ReturnNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type RubyString ¶ added in v1.1.0
type RubyString struct { Value string `json:"value"` Encoding string `json:"encoding"` ValidEncoding bool `json:"validEncoding"` }
RubyString represents an encoded Ruby string.
type SeekableBuffer ¶ added in v1.1.0
type SeekableBuffer struct {
// contains filtered or unexported fields
}
SeekableBuffer is a buffer that can be read from and written to at an arbitrary position.
func NewSeekableBuffer ¶ added in v1.1.0
func NewSeekableBuffer(data []byte) *SeekableBuffer
NewSeekableBuffer initializes a SeekableBuffer with the given data.
func (*SeekableBuffer) Bytes ¶ added in v1.1.0
func (sb *SeekableBuffer) Bytes() []byte
Bytes returns the contents of the buffer.
func (*SeekableBuffer) Get ¶ added in v1.1.0
func (sb *SeekableBuffer) Get(pos int) byte
Get returns the byte at the given position in the buffer.
func (*SeekableBuffer) Len ¶ added in v1.1.0
func (sb *SeekableBuffer) Len() int
Len returns the length of the buffer.
func (*SeekableBuffer) Position ¶ added in v1.1.0
func (sb *SeekableBuffer) Position() int
Position returns the current position in the buffer.
func (*SeekableBuffer) Read ¶ added in v1.1.0
func (sb *SeekableBuffer) Read(p []byte) (int, error)
Read reads data from the buffer starting at the current position.
func (*SeekableBuffer) ReadByte ¶ added in v1.1.0
func (sb *SeekableBuffer) ReadByte() (byte, error)
ReadByte reads a single byte from the buffer at the current position.
func (*SeekableBuffer) Seek ¶ added in v1.1.0
func (sb *SeekableBuffer) Seek(offset int)
Seek adjusts the current position.
func (*SeekableBuffer) SetPosition ¶ added in v1.1.0
func (sb *SeekableBuffer) SetPosition(pos int)
SetPosition sets the current position in the buffer.
type SelfNode ¶
type SelfNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` // contains filtered or unexported fields }
Represents the `self` keyword.
self ^^^^
func NewSelfNode ¶
NewSelfNode creates a new SelfNode.
func (*SelfNode) ChildNodes ¶ added in v1.1.0
ChildNodes returns all child nodes of the current node.
func (*SelfNode) CompactChildNodes ¶ added in v1.1.0
CompactChildNodes returns all non-nil child nodes.
func (*SelfNode) GetLocation ¶ added in v1.1.0
GetLocation returns the location of this node.
type SerializationBuffer ¶ added in v1.1.0
type SerializationBuffer struct {
// contains filtered or unexported fields
}
SerializationBuffer handles reading from the serialized binary format.
func NewSerializationBuffer ¶ added in v1.1.0
func NewSerializationBuffer(source, array []byte) *SerializationBuffer
NewSerializationBuffer creates a new SerializationBuffer.
func (*SerializationBuffer) ReadDouble ¶ added in v1.1.0
func (b *SerializationBuffer) ReadDouble() float64
ReadDouble reads a double-precision floating point number.
func (*SerializationBuffer) ReadLocation ¶ added in v1.1.0
func (b *SerializationBuffer) ReadLocation() Location
ReadLocation reads a location from the buffer.
func (*SerializationBuffer) ReadOptionalLocation ¶ added in v1.1.0
func (b *SerializationBuffer) ReadOptionalLocation() *Location
ReadOptionalLocation reads an optional location from the buffer.
func (*SerializationBuffer) ReadRawByte ¶ added in v1.1.0
func (b *SerializationBuffer) ReadRawByte() byte
ReadRawByte reads a single byte from the buffer.
func (*SerializationBuffer) ReadRawBytes ¶ added in v1.1.0
func (b *SerializationBuffer) ReadRawBytes(length int) []byte
ReadRawBytes reads the specified number of bytes from the buffer.
func (*SerializationBuffer) ReadString ¶ added in v1.1.0
func (b *SerializationBuffer) ReadString(length int, flags uint32) string
ReadString reads a string of the specified length with encoding flags.
func (*SerializationBuffer) ReadStringField ¶ added in v1.1.0
func (b *SerializationBuffer) ReadStringField(flags uint32) RubyString
ReadStringField reads a string field with encoding flags.
func (*SerializationBuffer) ReadUint32 ¶ added in v1.1.0
func (b *SerializationBuffer) ReadUint32() uint32
ReadUint32 reads a 32-bit unsigned integer in little-endian format.
func (*SerializationBuffer) ReadVarInt ¶ added in v1.1.0
func (b *SerializationBuffer) ReadVarInt() int
ReadVarInt reads a variable-length integer.
func (*SerializationBuffer) ScanConstant ¶ added in v1.1.0
func (b *SerializationBuffer) ScanConstant(constantPoolOffset int, constantIndex int) string
ScanConstant scans a constant from the constant pool.
type ShareableConstantNode ¶ added in v1.1.0
type ShareableConstantNode struct { // contains filtered or unexported fields }
This node wraps a constant write to indicate that when the value is written, it should have its shareability state modified.
# shareable_constant_value: literal C = { a: 1 } ^^^^^^^^^^^^
func NewShareableConstantNode ¶ added in v1.1.0
func NewShareableConstantNode(nodeID int, location Location, flags uint32, write Node) *ShareableConstantNode
NewShareableConstantNode creates a new ShareableConstantNode.
func (*ShareableConstantNode) Accept ¶ added in v1.1.0
func (n *ShareableConstantNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*ShareableConstantNode) ChildNodes ¶ added in v1.1.0
func (n *ShareableConstantNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*ShareableConstantNode) CompactChildNodes ¶ added in v1.1.0
func (n *ShareableConstantNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*ShareableConstantNode) GetLocation ¶ added in v1.1.0
func (n *ShareableConstantNode) GetLocation() Location
GetLocation returns the location of this node.
func (*ShareableConstantNode) GetNodeID ¶ added in v1.1.0
func (n *ShareableConstantNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*ShareableConstantNode) IsEXPERIMENTAL_COPY ¶ added in v1.1.0
func (n *ShareableConstantNode) IsEXPERIMENTAL_COPY() bool
IsEXPERIMENTAL_COPY returns true if this node has the EXPERIMENTAL_COPY flag.
func (*ShareableConstantNode) IsEXPERIMENTAL_EVERYTHING ¶ added in v1.1.0
func (n *ShareableConstantNode) IsEXPERIMENTAL_EVERYTHING() bool
IsEXPERIMENTAL_EVERYTHING returns true if this node has the EXPERIMENTAL_EVERYTHING flag.
func (*ShareableConstantNode) IsLITERAL ¶ added in v1.1.0
func (n *ShareableConstantNode) IsLITERAL() bool
IsLITERAL returns true if this node has the LITERAL flag.
func (*ShareableConstantNode) ToJSON ¶ added in v1.1.0
func (n *ShareableConstantNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type SingletonClassNode ¶
type SingletonClassNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Locals []string `json:"locals"` ClassKeywordLoc Location `json:"class_keyword_loc"` OperatorLoc Location `json:"operator_loc"` Expression Node `json:"expression"` Body Node `json:"body"` EndKeywordLoc Location `json:"end_keyword_loc"` // contains filtered or unexported fields }
Represents a singleton class declaration involving the `class` keyword.
class << self end ^^^^^^^^^^^^^^^^^
func NewSingletonClassNode ¶
func NewSingletonClassNode(nodeID int, location Location, flags uint32, locals []string, class_keyword_loc Location, operator_loc Location, expression Node, body Node, end_keyword_loc Location) *SingletonClassNode
NewSingletonClassNode creates a new SingletonClassNode.
func (*SingletonClassNode) Accept ¶
func (n *SingletonClassNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*SingletonClassNode) ChildNodes ¶ added in v1.1.0
func (n *SingletonClassNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*SingletonClassNode) CompactChildNodes ¶ added in v1.1.0
func (n *SingletonClassNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*SingletonClassNode) GetLocation ¶ added in v1.1.0
func (n *SingletonClassNode) GetLocation() Location
GetLocation returns the location of this node.
func (*SingletonClassNode) GetNodeID ¶ added in v1.1.0
func (n *SingletonClassNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*SingletonClassNode) ToJSON ¶ added in v1.1.0
func (n *SingletonClassNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type Source ¶ added in v1.1.0
func (*Source) SetLineOffsets ¶ added in v1.1.0
func (*Source) SetStartLine ¶ added in v1.1.0
type SourceEncodingNode ¶
type SourceEncodingNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` // contains filtered or unexported fields }
Represents the use of the `__ENCODING__` keyword.
__ENCODING__ ^^^^^^^^^^^^
func NewSourceEncodingNode ¶
func NewSourceEncodingNode(nodeID int, location Location, flags uint32) *SourceEncodingNode
NewSourceEncodingNode creates a new SourceEncodingNode.
func (*SourceEncodingNode) Accept ¶
func (n *SourceEncodingNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*SourceEncodingNode) ChildNodes ¶ added in v1.1.0
func (n *SourceEncodingNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*SourceEncodingNode) CompactChildNodes ¶ added in v1.1.0
func (n *SourceEncodingNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*SourceEncodingNode) GetLocation ¶ added in v1.1.0
func (n *SourceEncodingNode) GetLocation() Location
GetLocation returns the location of this node.
func (*SourceEncodingNode) GetNodeID ¶ added in v1.1.0
func (n *SourceEncodingNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*SourceEncodingNode) ToJSON ¶ added in v1.1.0
func (n *SourceEncodingNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type SourceFileNode ¶
type SourceFileNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Filepath RubyString `json:"filepath"` // contains filtered or unexported fields }
Represents the use of the `__FILE__` keyword.
__FILE__ ^^^^^^^^
func NewSourceFileNode ¶
func NewSourceFileNode(nodeID int, location Location, flags uint32, filepath RubyString) *SourceFileNode
NewSourceFileNode creates a new SourceFileNode.
func (*SourceFileNode) Accept ¶
func (n *SourceFileNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*SourceFileNode) ChildNodes ¶ added in v1.1.0
func (n *SourceFileNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*SourceFileNode) CompactChildNodes ¶ added in v1.1.0
func (n *SourceFileNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*SourceFileNode) GetLocation ¶ added in v1.1.0
func (n *SourceFileNode) GetLocation() Location
GetLocation returns the location of this node.
func (*SourceFileNode) GetNodeID ¶ added in v1.1.0
func (n *SourceFileNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*SourceFileNode) IsFORCED_BINARY_ENCODING ¶ added in v1.1.0
func (n *SourceFileNode) IsFORCED_BINARY_ENCODING() bool
IsFORCED_BINARY_ENCODING returns true if this node has the FORCED_BINARY_ENCODING flag.
func (*SourceFileNode) IsFORCED_UTF8_ENCODING ¶ added in v1.1.0
func (n *SourceFileNode) IsFORCED_UTF8_ENCODING() bool
IsFORCED_UTF8_ENCODING returns true if this node has the FORCED_UTF8_ENCODING flag.
func (*SourceFileNode) IsFROZEN ¶ added in v1.1.0
func (n *SourceFileNode) IsFROZEN() bool
IsFROZEN returns true if this node has the FROZEN flag.
func (*SourceFileNode) IsMUTABLE ¶ added in v1.1.0
func (n *SourceFileNode) IsMUTABLE() bool
IsMUTABLE returns true if this node has the MUTABLE flag.
func (*SourceFileNode) ToJSON ¶ added in v1.1.0
func (n *SourceFileNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type SourceLineNode ¶
type SourceLineNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` // contains filtered or unexported fields }
Represents the use of the `__LINE__` keyword.
__LINE__ ^^^^^^^^
func NewSourceLineNode ¶
func NewSourceLineNode(nodeID int, location Location, flags uint32) *SourceLineNode
NewSourceLineNode creates a new SourceLineNode.
func (*SourceLineNode) Accept ¶
func (n *SourceLineNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*SourceLineNode) ChildNodes ¶ added in v1.1.0
func (n *SourceLineNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*SourceLineNode) CompactChildNodes ¶ added in v1.1.0
func (n *SourceLineNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*SourceLineNode) GetLocation ¶ added in v1.1.0
func (n *SourceLineNode) GetLocation() Location
GetLocation returns the location of this node.
func (*SourceLineNode) GetNodeID ¶ added in v1.1.0
func (n *SourceLineNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*SourceLineNode) ToJSON ¶ added in v1.1.0
func (n *SourceLineNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type SplatNode ¶
type SplatNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` OperatorLoc Location `json:"operator_loc"` Expression Node `json:"expression"` // contains filtered or unexported fields }
Represents the use of the splat operator.
[*a] ^^
func NewSplatNode ¶
func NewSplatNode(nodeID int, location Location, flags uint32, operator_loc Location, expression Node) *SplatNode
NewSplatNode creates a new SplatNode.
func (*SplatNode) ChildNodes ¶ added in v1.1.0
ChildNodes returns all child nodes of the current node.
func (*SplatNode) CompactChildNodes ¶ added in v1.1.0
CompactChildNodes returns all non-nil child nodes.
func (*SplatNode) GetLocation ¶ added in v1.1.0
GetLocation returns the location of this node.
type StatementsNode ¶
type StatementsNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Body []Node `json:"body"` // contains filtered or unexported fields }
Represents a set of statements contained within some scope.
foo; bar; baz ^^^^^^^^^^^^^
func NewStatementsNode ¶
func NewStatementsNode(nodeID int, location Location, flags uint32, body []Node) *StatementsNode
NewStatementsNode creates a new StatementsNode.
func (*StatementsNode) Accept ¶
func (n *StatementsNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*StatementsNode) ChildNodes ¶ added in v1.1.0
func (n *StatementsNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*StatementsNode) CompactChildNodes ¶ added in v1.1.0
func (n *StatementsNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*StatementsNode) GetLocation ¶ added in v1.1.0
func (n *StatementsNode) GetLocation() Location
GetLocation returns the location of this node.
func (*StatementsNode) GetNodeID ¶ added in v1.1.0
func (n *StatementsNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*StatementsNode) ToJSON ¶ added in v1.1.0
func (n *StatementsNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type StringNode ¶
type StringNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` OpeningLoc *Location `json:"opening_loc"` ContentLoc Location `json:"content_loc"` ClosingLoc *Location `json:"closing_loc"` Unescaped RubyString `json:"unescaped"` // contains filtered or unexported fields }
Represents a string literal, a string contained within a `%w` list, or plain string content within an interpolated string.
"foo" ^^^^^ %w[foo] ^^^ "foo #{bar} baz" ^^^^ ^^^^
func NewStringNode ¶
func NewStringNode(nodeID int, location Location, flags uint32, opening_loc *Location, content_loc Location, closing_loc *Location, unescaped RubyString) *StringNode
NewStringNode creates a new StringNode.
func (*StringNode) Accept ¶
func (n *StringNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*StringNode) ChildNodes ¶ added in v1.1.0
func (n *StringNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*StringNode) CompactChildNodes ¶ added in v1.1.0
func (n *StringNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*StringNode) GetLocation ¶ added in v1.1.0
func (n *StringNode) GetLocation() Location
GetLocation returns the location of this node.
func (*StringNode) GetNodeID ¶ added in v1.1.0
func (n *StringNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*StringNode) IsFORCED_BINARY_ENCODING ¶ added in v1.1.0
func (n *StringNode) IsFORCED_BINARY_ENCODING() bool
IsFORCED_BINARY_ENCODING returns true if this node has the FORCED_BINARY_ENCODING flag.
func (*StringNode) IsFORCED_UTF8_ENCODING ¶ added in v1.1.0
func (n *StringNode) IsFORCED_UTF8_ENCODING() bool
IsFORCED_UTF8_ENCODING returns true if this node has the FORCED_UTF8_ENCODING flag.
func (*StringNode) IsFROZEN ¶ added in v1.1.0
func (n *StringNode) IsFROZEN() bool
IsFROZEN returns true if this node has the FROZEN flag.
func (*StringNode) IsMUTABLE ¶ added in v1.1.0
func (n *StringNode) IsMUTABLE() bool
IsMUTABLE returns true if this node has the MUTABLE flag.
func (*StringNode) ToJSON ¶ added in v1.1.0
func (n *StringNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type SuperNode ¶
type SuperNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` KeywordLoc Location `json:"keyword_loc"` LparenLoc *Location `json:"lparen_loc"` Arguments *ArgumentsNode `json:"arguments"` RparenLoc *Location `json:"rparen_loc"` Block Node `json:"block"` // contains filtered or unexported fields }
Represents the use of the `super` keyword with parentheses or arguments.
super() ^^^^^^^ super foo, bar ^^^^^^^^^^^^^^
func NewSuperNode ¶
func NewSuperNode(nodeID int, location Location, flags uint32, keyword_loc Location, lparen_loc *Location, arguments *ArgumentsNode, rparen_loc *Location, block Node) *SuperNode
NewSuperNode creates a new SuperNode.
func (*SuperNode) ChildNodes ¶ added in v1.1.0
ChildNodes returns all child nodes of the current node.
func (*SuperNode) CompactChildNodes ¶ added in v1.1.0
CompactChildNodes returns all non-nil child nodes.
func (*SuperNode) GetLocation ¶ added in v1.1.0
GetLocation returns the location of this node.
type SymbolNode ¶
type SymbolNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` OpeningLoc *Location `json:"opening_loc"` ValueLoc *Location `json:"value_loc"` ClosingLoc *Location `json:"closing_loc"` Unescaped RubyString `json:"unescaped"` // contains filtered or unexported fields }
Represents a symbol literal or a symbol contained within a `%i` list.
:foo ^^^^ %i[foo] ^^^
func NewSymbolNode ¶
func NewSymbolNode(nodeID int, location Location, flags uint32, opening_loc *Location, value_loc *Location, closing_loc *Location, unescaped RubyString) *SymbolNode
NewSymbolNode creates a new SymbolNode.
func (*SymbolNode) Accept ¶
func (n *SymbolNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*SymbolNode) ChildNodes ¶ added in v1.1.0
func (n *SymbolNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*SymbolNode) CompactChildNodes ¶ added in v1.1.0
func (n *SymbolNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*SymbolNode) GetLocation ¶ added in v1.1.0
func (n *SymbolNode) GetLocation() Location
GetLocation returns the location of this node.
func (*SymbolNode) GetNodeID ¶ added in v1.1.0
func (n *SymbolNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*SymbolNode) IsFORCED_BINARY_ENCODING ¶ added in v1.1.0
func (n *SymbolNode) IsFORCED_BINARY_ENCODING() bool
IsFORCED_BINARY_ENCODING returns true if this node has the FORCED_BINARY_ENCODING flag.
func (*SymbolNode) IsFORCED_US_ASCII_ENCODING ¶ added in v1.1.0
func (n *SymbolNode) IsFORCED_US_ASCII_ENCODING() bool
IsFORCED_US_ASCII_ENCODING returns true if this node has the FORCED_US_ASCII_ENCODING flag.
func (*SymbolNode) IsFORCED_UTF8_ENCODING ¶ added in v1.1.0
func (n *SymbolNode) IsFORCED_UTF8_ENCODING() bool
IsFORCED_UTF8_ENCODING returns true if this node has the FORCED_UTF8_ENCODING flag.
func (*SymbolNode) ToJSON ¶ added in v1.1.0
func (n *SymbolNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type SyntaxVersion ¶ added in v1.1.0
type SyntaxVersion byte
const ( SyntaxVersionLatest SyntaxVersion = iota SyntaxVersionV3_3 SyntaxVersionV3_4 )
type TrueNode ¶
type TrueNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` // contains filtered or unexported fields }
Represents the use of the literal `true` keyword.
true ^^^^
func NewTrueNode ¶
NewTrueNode creates a new TrueNode.
func (*TrueNode) ChildNodes ¶ added in v1.1.0
ChildNodes returns all child nodes of the current node.
func (*TrueNode) CompactChildNodes ¶ added in v1.1.0
CompactChildNodes returns all non-nil child nodes.
func (*TrueNode) GetLocation ¶ added in v1.1.0
GetLocation returns the location of this node.
type UndefNode ¶
type UndefNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` Names []Node `json:"names"` KeywordLoc Location `json:"keyword_loc"` // contains filtered or unexported fields }
Represents the use of the `undef` keyword.
undef :foo, :bar, :baz ^^^^^^^^^^^^^^^^^^^^^^
func NewUndefNode ¶
func NewUndefNode(nodeID int, location Location, flags uint32, names []Node, keyword_loc Location) *UndefNode
NewUndefNode creates a new UndefNode.
func (*UndefNode) ChildNodes ¶ added in v1.1.0
ChildNodes returns all child nodes of the current node.
func (*UndefNode) CompactChildNodes ¶ added in v1.1.0
CompactChildNodes returns all non-nil child nodes.
func (*UndefNode) GetLocation ¶ added in v1.1.0
GetLocation returns the location of this node.
type UnlessNode ¶
type UnlessNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` KeywordLoc Location `json:"keyword_loc"` Predicate Node `json:"predicate"` ThenKeywordLoc *Location `json:"then_keyword_loc"` Statements *StatementsNode `json:"statements"` ElseClause *ElseNode `json:"else_clause"` EndKeywordLoc *Location `json:"end_keyword_loc"` // contains filtered or unexported fields }
Represents the use of the `unless` keyword, either in the block form or the modifier form.
bar unless foo ^^^^^^^^^^^^^^ unless foo then bar end ^^^^^^^^^^^^^^^^^^^^^^^
func NewUnlessNode ¶
func NewUnlessNode(nodeID int, location Location, flags uint32, keyword_loc Location, predicate Node, then_keyword_loc *Location, statements *StatementsNode, else_clause *ElseNode, end_keyword_loc *Location) *UnlessNode
NewUnlessNode creates a new UnlessNode.
func (*UnlessNode) Accept ¶
func (n *UnlessNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*UnlessNode) ChildNodes ¶ added in v1.1.0
func (n *UnlessNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*UnlessNode) CompactChildNodes ¶ added in v1.1.0
func (n *UnlessNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*UnlessNode) GetLocation ¶ added in v1.1.0
func (n *UnlessNode) GetLocation() Location
GetLocation returns the location of this node.
func (*UnlessNode) GetNodeID ¶ added in v1.1.0
func (n *UnlessNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*UnlessNode) ToJSON ¶ added in v1.1.0
func (n *UnlessNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type UntilNode ¶
type UntilNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` KeywordLoc Location `json:"keyword_loc"` DoKeywordLoc *Location `json:"do_keyword_loc"` ClosingLoc *Location `json:"closing_loc"` Predicate Node `json:"predicate"` Statements *StatementsNode `json:"statements"` // contains filtered or unexported fields }
Represents the use of the `until` keyword, either in the block form or the modifier form.
bar until foo ^^^^^^^^^^^^^ until foo do bar end ^^^^^^^^^^^^^^^^^^^^
func NewUntilNode ¶
func NewUntilNode(nodeID int, location Location, flags uint32, keyword_loc Location, do_keyword_loc *Location, closing_loc *Location, predicate Node, statements *StatementsNode) *UntilNode
NewUntilNode creates a new UntilNode.
func (*UntilNode) ChildNodes ¶ added in v1.1.0
ChildNodes returns all child nodes of the current node.
func (*UntilNode) CompactChildNodes ¶ added in v1.1.0
CompactChildNodes returns all non-nil child nodes.
func (*UntilNode) GetLocation ¶ added in v1.1.0
GetLocation returns the location of this node.
func (*UntilNode) IsBEGIN_MODIFIER ¶ added in v1.1.0
IsBEGIN_MODIFIER returns true if this node has the BEGIN_MODIFIER flag.
type Visitor ¶ added in v1.1.0
type Visitor interface { BasicVisitor // VisitAliasGlobalVariableNode visits a AliasGlobalVariableNode node. VisitAliasGlobalVariableNode(node *AliasGlobalVariableNode) // VisitAliasMethodNode visits a AliasMethodNode node. VisitAliasMethodNode(node *AliasMethodNode) // VisitAlternationPatternNode visits a AlternationPatternNode node. VisitAlternationPatternNode(node *AlternationPatternNode) // VisitAndNode visits a AndNode node. VisitAndNode(node *AndNode) // VisitArgumentsNode visits a ArgumentsNode node. VisitArgumentsNode(node *ArgumentsNode) // VisitArrayNode visits a ArrayNode node. VisitArrayNode(node *ArrayNode) // VisitArrayPatternNode visits a ArrayPatternNode node. VisitArrayPatternNode(node *ArrayPatternNode) // VisitAssocNode visits a AssocNode node. VisitAssocNode(node *AssocNode) // VisitAssocSplatNode visits a AssocSplatNode node. VisitAssocSplatNode(node *AssocSplatNode) // VisitBackReferenceReadNode visits a BackReferenceReadNode node. VisitBackReferenceReadNode(node *BackReferenceReadNode) // VisitBeginNode visits a BeginNode node. VisitBeginNode(node *BeginNode) // VisitBlockArgumentNode visits a BlockArgumentNode node. VisitBlockArgumentNode(node *BlockArgumentNode) // VisitBlockLocalVariableNode visits a BlockLocalVariableNode node. VisitBlockLocalVariableNode(node *BlockLocalVariableNode) // VisitBlockNode visits a BlockNode node. VisitBlockNode(node *BlockNode) // VisitBlockParameterNode visits a BlockParameterNode node. VisitBlockParameterNode(node *BlockParameterNode) // VisitBlockParametersNode visits a BlockParametersNode node. VisitBlockParametersNode(node *BlockParametersNode) // VisitBreakNode visits a BreakNode node. VisitBreakNode(node *BreakNode) // VisitCallAndWriteNode visits a CallAndWriteNode node. VisitCallAndWriteNode(node *CallAndWriteNode) // VisitCallNode visits a CallNode node. VisitCallNode(node *CallNode) // VisitCallOperatorWriteNode visits a CallOperatorWriteNode node. VisitCallOperatorWriteNode(node *CallOperatorWriteNode) // VisitCallOrWriteNode visits a CallOrWriteNode node. VisitCallOrWriteNode(node *CallOrWriteNode) // VisitCallTargetNode visits a CallTargetNode node. VisitCallTargetNode(node *CallTargetNode) // VisitCapturePatternNode visits a CapturePatternNode node. VisitCapturePatternNode(node *CapturePatternNode) // VisitCaseMatchNode visits a CaseMatchNode node. VisitCaseMatchNode(node *CaseMatchNode) // VisitCaseNode visits a CaseNode node. VisitCaseNode(node *CaseNode) // VisitClassNode visits a ClassNode node. VisitClassNode(node *ClassNode) // VisitClassVariableAndWriteNode visits a ClassVariableAndWriteNode node. VisitClassVariableAndWriteNode(node *ClassVariableAndWriteNode) // VisitClassVariableOperatorWriteNode visits a ClassVariableOperatorWriteNode node. VisitClassVariableOperatorWriteNode(node *ClassVariableOperatorWriteNode) // VisitClassVariableOrWriteNode visits a ClassVariableOrWriteNode node. VisitClassVariableOrWriteNode(node *ClassVariableOrWriteNode) // VisitClassVariableReadNode visits a ClassVariableReadNode node. VisitClassVariableReadNode(node *ClassVariableReadNode) // VisitClassVariableTargetNode visits a ClassVariableTargetNode node. VisitClassVariableTargetNode(node *ClassVariableTargetNode) // VisitClassVariableWriteNode visits a ClassVariableWriteNode node. VisitClassVariableWriteNode(node *ClassVariableWriteNode) // VisitConstantAndWriteNode visits a ConstantAndWriteNode node. VisitConstantAndWriteNode(node *ConstantAndWriteNode) // VisitConstantOperatorWriteNode visits a ConstantOperatorWriteNode node. VisitConstantOperatorWriteNode(node *ConstantOperatorWriteNode) // VisitConstantOrWriteNode visits a ConstantOrWriteNode node. VisitConstantOrWriteNode(node *ConstantOrWriteNode) // VisitConstantPathAndWriteNode visits a ConstantPathAndWriteNode node. VisitConstantPathAndWriteNode(node *ConstantPathAndWriteNode) // VisitConstantPathNode visits a ConstantPathNode node. VisitConstantPathNode(node *ConstantPathNode) // VisitConstantPathOperatorWriteNode visits a ConstantPathOperatorWriteNode node. VisitConstantPathOperatorWriteNode(node *ConstantPathOperatorWriteNode) // VisitConstantPathOrWriteNode visits a ConstantPathOrWriteNode node. VisitConstantPathOrWriteNode(node *ConstantPathOrWriteNode) // VisitConstantPathTargetNode visits a ConstantPathTargetNode node. VisitConstantPathTargetNode(node *ConstantPathTargetNode) // VisitConstantPathWriteNode visits a ConstantPathWriteNode node. VisitConstantPathWriteNode(node *ConstantPathWriteNode) // VisitConstantReadNode visits a ConstantReadNode node. VisitConstantReadNode(node *ConstantReadNode) // VisitConstantTargetNode visits a ConstantTargetNode node. VisitConstantTargetNode(node *ConstantTargetNode) // VisitConstantWriteNode visits a ConstantWriteNode node. VisitConstantWriteNode(node *ConstantWriteNode) // VisitDefNode visits a DefNode node. VisitDefNode(node *DefNode) // VisitDefinedNode visits a DefinedNode node. VisitDefinedNode(node *DefinedNode) // VisitElseNode visits a ElseNode node. VisitElseNode(node *ElseNode) // VisitEmbeddedStatementsNode visits a EmbeddedStatementsNode node. VisitEmbeddedStatementsNode(node *EmbeddedStatementsNode) // VisitEmbeddedVariableNode visits a EmbeddedVariableNode node. VisitEmbeddedVariableNode(node *EmbeddedVariableNode) // VisitEnsureNode visits a EnsureNode node. VisitEnsureNode(node *EnsureNode) // VisitFalseNode visits a FalseNode node. VisitFalseNode(node *FalseNode) // VisitFindPatternNode visits a FindPatternNode node. VisitFindPatternNode(node *FindPatternNode) // VisitFlipFlopNode visits a FlipFlopNode node. VisitFlipFlopNode(node *FlipFlopNode) // VisitFloatNode visits a FloatNode node. VisitFloatNode(node *FloatNode) // VisitForNode visits a ForNode node. VisitForNode(node *ForNode) // VisitForwardingArgumentsNode visits a ForwardingArgumentsNode node. VisitForwardingArgumentsNode(node *ForwardingArgumentsNode) // VisitForwardingParameterNode visits a ForwardingParameterNode node. VisitForwardingParameterNode(node *ForwardingParameterNode) // VisitForwardingSuperNode visits a ForwardingSuperNode node. VisitForwardingSuperNode(node *ForwardingSuperNode) // VisitGlobalVariableAndWriteNode visits a GlobalVariableAndWriteNode node. VisitGlobalVariableAndWriteNode(node *GlobalVariableAndWriteNode) // VisitGlobalVariableOperatorWriteNode visits a GlobalVariableOperatorWriteNode node. VisitGlobalVariableOperatorWriteNode(node *GlobalVariableOperatorWriteNode) // VisitGlobalVariableOrWriteNode visits a GlobalVariableOrWriteNode node. VisitGlobalVariableOrWriteNode(node *GlobalVariableOrWriteNode) // VisitGlobalVariableReadNode visits a GlobalVariableReadNode node. VisitGlobalVariableReadNode(node *GlobalVariableReadNode) // VisitGlobalVariableTargetNode visits a GlobalVariableTargetNode node. VisitGlobalVariableTargetNode(node *GlobalVariableTargetNode) // VisitGlobalVariableWriteNode visits a GlobalVariableWriteNode node. VisitGlobalVariableWriteNode(node *GlobalVariableWriteNode) // VisitHashNode visits a HashNode node. VisitHashNode(node *HashNode) // VisitHashPatternNode visits a HashPatternNode node. VisitHashPatternNode(node *HashPatternNode) // VisitIfNode visits a IfNode node. VisitIfNode(node *IfNode) // VisitImaginaryNode visits a ImaginaryNode node. VisitImaginaryNode(node *ImaginaryNode) // VisitImplicitNode visits a ImplicitNode node. VisitImplicitNode(node *ImplicitNode) // VisitImplicitRestNode visits a ImplicitRestNode node. VisitImplicitRestNode(node *ImplicitRestNode) // VisitInNode visits a InNode node. VisitInNode(node *InNode) // VisitIndexAndWriteNode visits a IndexAndWriteNode node. VisitIndexAndWriteNode(node *IndexAndWriteNode) // VisitIndexOperatorWriteNode visits a IndexOperatorWriteNode node. VisitIndexOperatorWriteNode(node *IndexOperatorWriteNode) // VisitIndexOrWriteNode visits a IndexOrWriteNode node. VisitIndexOrWriteNode(node *IndexOrWriteNode) // VisitIndexTargetNode visits a IndexTargetNode node. VisitIndexTargetNode(node *IndexTargetNode) // VisitInstanceVariableAndWriteNode visits a InstanceVariableAndWriteNode node. VisitInstanceVariableAndWriteNode(node *InstanceVariableAndWriteNode) // VisitInstanceVariableOperatorWriteNode visits a InstanceVariableOperatorWriteNode node. VisitInstanceVariableOperatorWriteNode(node *InstanceVariableOperatorWriteNode) // VisitInstanceVariableOrWriteNode visits a InstanceVariableOrWriteNode node. VisitInstanceVariableOrWriteNode(node *InstanceVariableOrWriteNode) // VisitInstanceVariableReadNode visits a InstanceVariableReadNode node. VisitInstanceVariableReadNode(node *InstanceVariableReadNode) // VisitInstanceVariableTargetNode visits a InstanceVariableTargetNode node. VisitInstanceVariableTargetNode(node *InstanceVariableTargetNode) // VisitInstanceVariableWriteNode visits a InstanceVariableWriteNode node. VisitInstanceVariableWriteNode(node *InstanceVariableWriteNode) // VisitIntegerNode visits a IntegerNode node. VisitIntegerNode(node *IntegerNode) // VisitInterpolatedMatchLastLineNode visits a InterpolatedMatchLastLineNode node. VisitInterpolatedMatchLastLineNode(node *InterpolatedMatchLastLineNode) // VisitInterpolatedRegularExpressionNode visits a InterpolatedRegularExpressionNode node. VisitInterpolatedRegularExpressionNode(node *InterpolatedRegularExpressionNode) // VisitInterpolatedStringNode visits a InterpolatedStringNode node. VisitInterpolatedStringNode(node *InterpolatedStringNode) // VisitInterpolatedSymbolNode visits a InterpolatedSymbolNode node. VisitInterpolatedSymbolNode(node *InterpolatedSymbolNode) // VisitInterpolatedXStringNode visits a InterpolatedXStringNode node. VisitInterpolatedXStringNode(node *InterpolatedXStringNode) // VisitItLocalVariableReadNode visits a ItLocalVariableReadNode node. VisitItLocalVariableReadNode(node *ItLocalVariableReadNode) // VisitItParametersNode visits a ItParametersNode node. VisitItParametersNode(node *ItParametersNode) // VisitKeywordHashNode visits a KeywordHashNode node. VisitKeywordHashNode(node *KeywordHashNode) // VisitKeywordRestParameterNode visits a KeywordRestParameterNode node. VisitKeywordRestParameterNode(node *KeywordRestParameterNode) // VisitLambdaNode visits a LambdaNode node. VisitLambdaNode(node *LambdaNode) // VisitLocalVariableAndWriteNode visits a LocalVariableAndWriteNode node. VisitLocalVariableAndWriteNode(node *LocalVariableAndWriteNode) // VisitLocalVariableOperatorWriteNode visits a LocalVariableOperatorWriteNode node. VisitLocalVariableOperatorWriteNode(node *LocalVariableOperatorWriteNode) // VisitLocalVariableOrWriteNode visits a LocalVariableOrWriteNode node. VisitLocalVariableOrWriteNode(node *LocalVariableOrWriteNode) // VisitLocalVariableReadNode visits a LocalVariableReadNode node. VisitLocalVariableReadNode(node *LocalVariableReadNode) // VisitLocalVariableTargetNode visits a LocalVariableTargetNode node. VisitLocalVariableTargetNode(node *LocalVariableTargetNode) // VisitLocalVariableWriteNode visits a LocalVariableWriteNode node. VisitLocalVariableWriteNode(node *LocalVariableWriteNode) // VisitMatchLastLineNode visits a MatchLastLineNode node. VisitMatchLastLineNode(node *MatchLastLineNode) // VisitMatchPredicateNode visits a MatchPredicateNode node. VisitMatchPredicateNode(node *MatchPredicateNode) // VisitMatchRequiredNode visits a MatchRequiredNode node. VisitMatchRequiredNode(node *MatchRequiredNode) // VisitMatchWriteNode visits a MatchWriteNode node. VisitMatchWriteNode(node *MatchWriteNode) // VisitMissingNode visits a MissingNode node. VisitMissingNode(node *MissingNode) // VisitModuleNode visits a ModuleNode node. VisitModuleNode(node *ModuleNode) // VisitMultiTargetNode visits a MultiTargetNode node. VisitMultiTargetNode(node *MultiTargetNode) // VisitMultiWriteNode visits a MultiWriteNode node. VisitMultiWriteNode(node *MultiWriteNode) // VisitNextNode visits a NextNode node. VisitNextNode(node *NextNode) // VisitNilNode visits a NilNode node. VisitNilNode(node *NilNode) // VisitNoKeywordsParameterNode visits a NoKeywordsParameterNode node. VisitNoKeywordsParameterNode(node *NoKeywordsParameterNode) // VisitNumberedParametersNode visits a NumberedParametersNode node. VisitNumberedParametersNode(node *NumberedParametersNode) // VisitNumberedReferenceReadNode visits a NumberedReferenceReadNode node. VisitNumberedReferenceReadNode(node *NumberedReferenceReadNode) // VisitOptionalKeywordParameterNode visits a OptionalKeywordParameterNode node. VisitOptionalKeywordParameterNode(node *OptionalKeywordParameterNode) // VisitOptionalParameterNode visits a OptionalParameterNode node. VisitOptionalParameterNode(node *OptionalParameterNode) // VisitOrNode visits a OrNode node. VisitOrNode(node *OrNode) // VisitParametersNode visits a ParametersNode node. VisitParametersNode(node *ParametersNode) // VisitParenthesesNode visits a ParenthesesNode node. VisitParenthesesNode(node *ParenthesesNode) // VisitPinnedExpressionNode visits a PinnedExpressionNode node. VisitPinnedExpressionNode(node *PinnedExpressionNode) // VisitPinnedVariableNode visits a PinnedVariableNode node. VisitPinnedVariableNode(node *PinnedVariableNode) // VisitPostExecutionNode visits a PostExecutionNode node. VisitPostExecutionNode(node *PostExecutionNode) // VisitPreExecutionNode visits a PreExecutionNode node. VisitPreExecutionNode(node *PreExecutionNode) // VisitProgramNode visits a ProgramNode node. VisitProgramNode(node *ProgramNode) // VisitRangeNode visits a RangeNode node. VisitRangeNode(node *RangeNode) // VisitRationalNode visits a RationalNode node. VisitRationalNode(node *RationalNode) // VisitRedoNode visits a RedoNode node. VisitRedoNode(node *RedoNode) // VisitRegularExpressionNode visits a RegularExpressionNode node. VisitRegularExpressionNode(node *RegularExpressionNode) // VisitRequiredKeywordParameterNode visits a RequiredKeywordParameterNode node. VisitRequiredKeywordParameterNode(node *RequiredKeywordParameterNode) // VisitRequiredParameterNode visits a RequiredParameterNode node. VisitRequiredParameterNode(node *RequiredParameterNode) // VisitRescueModifierNode visits a RescueModifierNode node. VisitRescueModifierNode(node *RescueModifierNode) // VisitRescueNode visits a RescueNode node. VisitRescueNode(node *RescueNode) // VisitRestParameterNode visits a RestParameterNode node. VisitRestParameterNode(node *RestParameterNode) // VisitRetryNode visits a RetryNode node. VisitRetryNode(node *RetryNode) // VisitReturnNode visits a ReturnNode node. VisitReturnNode(node *ReturnNode) // VisitSelfNode visits a SelfNode node. VisitSelfNode(node *SelfNode) VisitShareableConstantNode(node *ShareableConstantNode) // VisitSingletonClassNode visits a SingletonClassNode node. VisitSingletonClassNode(node *SingletonClassNode) // VisitSourceEncodingNode visits a SourceEncodingNode node. VisitSourceEncodingNode(node *SourceEncodingNode) // VisitSourceFileNode visits a SourceFileNode node. VisitSourceFileNode(node *SourceFileNode) // VisitSourceLineNode visits a SourceLineNode node. VisitSourceLineNode(node *SourceLineNode) // VisitSplatNode visits a SplatNode node. VisitSplatNode(node *SplatNode) // VisitStatementsNode visits a StatementsNode node. VisitStatementsNode(node *StatementsNode) // VisitStringNode visits a StringNode node. VisitStringNode(node *StringNode) // VisitSuperNode visits a SuperNode node. VisitSuperNode(node *SuperNode) // VisitSymbolNode visits a SymbolNode node. VisitSymbolNode(node *SymbolNode) // VisitTrueNode visits a TrueNode node. VisitTrueNode(node *TrueNode) // VisitUndefNode visits a UndefNode node. VisitUndefNode(node *UndefNode) // VisitUnlessNode visits a UnlessNode node. VisitUnlessNode(node *UnlessNode) // VisitUntilNode visits a UntilNode node. VisitUntilNode(node *UntilNode) // VisitWhenNode visits a WhenNode node. VisitWhenNode(node *WhenNode) // VisitWhileNode visits a WhileNode node. VisitWhileNode(node *WhileNode) // VisitXStringNode visits a XStringNode node. VisitXStringNode(node *XStringNode) // VisitYieldNode visits a YieldNode node. VisitYieldNode(node *YieldNode) }
Visitor provides a default implementation for every visit method defined on the nodes. This means it can walk a tree without the caller needing to define any special handling. This allows you to handle a subset of the tree, while still walking the whole tree.
For example, to find all of the method calls that call the "foo" method, you could implement:
type FooCallVisitor struct { DefaultVisitor FooCalls []*CallNode } func (v *FooCallVisitor) VisitCallNode(node *CallNode) { if node.Name == "foo" { v.FooCalls = append(v.FooCalls, node) } // Call the default implementation to continue walking the tree v.DefaultVisitor.VisitCallNode(node) }
type WhenNode ¶
type WhenNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` KeywordLoc Location `json:"keyword_loc"` Conditions []Node `json:"conditions"` ThenKeywordLoc *Location `json:"then_keyword_loc"` Statements *StatementsNode `json:"statements"` // contains filtered or unexported fields }
Represents the use of the `when` keyword within a case statement.
case true when true ^^^^^^^^^ end
func NewWhenNode ¶
func NewWhenNode(nodeID int, location Location, flags uint32, keyword_loc Location, conditions []Node, then_keyword_loc *Location, statements *StatementsNode) *WhenNode
NewWhenNode creates a new WhenNode.
func (*WhenNode) ChildNodes ¶ added in v1.1.0
ChildNodes returns all child nodes of the current node.
func (*WhenNode) CompactChildNodes ¶ added in v1.1.0
CompactChildNodes returns all non-nil child nodes.
func (*WhenNode) GetLocation ¶ added in v1.1.0
GetLocation returns the location of this node.
type WhileNode ¶
type WhileNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` KeywordLoc Location `json:"keyword_loc"` DoKeywordLoc *Location `json:"do_keyword_loc"` ClosingLoc *Location `json:"closing_loc"` Predicate Node `json:"predicate"` Statements *StatementsNode `json:"statements"` // contains filtered or unexported fields }
Represents the use of the `while` keyword, either in the block form or the modifier form.
bar while foo ^^^^^^^^^^^^^ while foo do bar end ^^^^^^^^^^^^^^^^^^^^
func NewWhileNode ¶
func NewWhileNode(nodeID int, location Location, flags uint32, keyword_loc Location, do_keyword_loc *Location, closing_loc *Location, predicate Node, statements *StatementsNode) *WhileNode
NewWhileNode creates a new WhileNode.
func (*WhileNode) ChildNodes ¶ added in v1.1.0
ChildNodes returns all child nodes of the current node.
func (*WhileNode) CompactChildNodes ¶ added in v1.1.0
CompactChildNodes returns all non-nil child nodes.
func (*WhileNode) GetLocation ¶ added in v1.1.0
GetLocation returns the location of this node.
func (*WhileNode) IsBEGIN_MODIFIER ¶ added in v1.1.0
IsBEGIN_MODIFIER returns true if this node has the BEGIN_MODIFIER flag.
type XStringNode ¶
type XStringNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` OpeningLoc Location `json:"opening_loc"` ContentLoc Location `json:"content_loc"` ClosingLoc Location `json:"closing_loc"` Unescaped RubyString `json:"unescaped"` // contains filtered or unexported fields }
Represents an xstring literal with no interpolation.
`foo` ^^^^^
func NewXStringNode ¶
func NewXStringNode(nodeID int, location Location, flags uint32, opening_loc Location, content_loc Location, closing_loc Location, unescaped RubyString) *XStringNode
NewXStringNode creates a new XStringNode.
func (*XStringNode) Accept ¶
func (n *XStringNode) Accept(visitor Visitor)
Accept calls the appropriate visit method on the visitor.
func (*XStringNode) ChildNodes ¶ added in v1.1.0
func (n *XStringNode) ChildNodes() []Node
ChildNodes returns all child nodes of the current node.
func (*XStringNode) CompactChildNodes ¶ added in v1.1.0
func (n *XStringNode) CompactChildNodes() []Node
CompactChildNodes returns all non-nil child nodes.
func (*XStringNode) GetLocation ¶ added in v1.1.0
func (n *XStringNode) GetLocation() Location
GetLocation returns the location of this node.
func (*XStringNode) GetNodeID ¶ added in v1.1.0
func (n *XStringNode) GetNodeID() int
GetNodeID returns the node ID of this node.
func (*XStringNode) IsFORCED_BINARY_ENCODING ¶ added in v1.1.0
func (n *XStringNode) IsFORCED_BINARY_ENCODING() bool
IsFORCED_BINARY_ENCODING returns true if this node has the FORCED_BINARY_ENCODING flag.
func (*XStringNode) IsFORCED_UTF8_ENCODING ¶ added in v1.1.0
func (n *XStringNode) IsFORCED_UTF8_ENCODING() bool
IsFORCED_UTF8_ENCODING returns true if this node has the FORCED_UTF8_ENCODING flag.
func (*XStringNode) ToJSON ¶ added in v1.1.0
func (n *XStringNode) ToJSON() map[string]interface{}
ToJSON converts the node to a JSON-serializable map.
type YieldNode ¶
type YieldNode struct { NodeID int `json:"nodeID"` Location Location `json:"location"` KeywordLoc Location `json:"keyword_loc"` LparenLoc *Location `json:"lparen_loc"` Arguments *ArgumentsNode `json:"arguments"` RparenLoc *Location `json:"rparen_loc"` // contains filtered or unexported fields }
Represents the use of the `yield` keyword.
yield 1 ^^^^^^^
func NewYieldNode ¶
func NewYieldNode(nodeID int, location Location, flags uint32, keyword_loc Location, lparen_loc *Location, arguments *ArgumentsNode, rparen_loc *Location) *YieldNode
NewYieldNode creates a new YieldNode.
func (*YieldNode) ChildNodes ¶ added in v1.1.0
ChildNodes returns all child nodes of the current node.
func (*YieldNode) CompactChildNodes ¶ added in v1.1.0
CompactChildNodes returns all non-nil child nodes.
func (*YieldNode) GetLocation ¶ added in v1.1.0
GetLocation returns the location of this node.