Class: Vertigo::AstNode
- Inherits:
-
Object
- Object
- Vertigo::AstNode
- Defined in:
- lib/vertigo/ast.rb,
lib/vertigo/ast_vertigo_rkgen.rb
Direct Known Subclasses
After, Aggregate, Alias, Alternative, Architecture, ArrayDecl, ArrayDimDecl, ArrayType, Assert, Assoc, AttributeDecl, AttributeSpec, Attributed, Binary, Body, BoolLit, Case, CaseWhen, CharLit, Comment, ComponentDecl, ComponentInstance, Concat, CondExpr, Constant, DiscreteRange, Else, Elsif, Entity, EntityInstance, EntitySpec, EnumDecl, ForGenerate, FormalArg, FuncCall, FuncDecl, FuncProtoDecl, Generic, GenericMap, Ident, If, IfGenerate, InOut, Input, IntLit, IsolatedRange, Label, Library, Map, NamedType, NullStmt, Output, Package, PackageBody, Parenth, PortMap, ProcedureCall, ProcedureDecl, Process, Qualified, RangedType, RecordDecl, RecordItem, Report, Return, Root, SelectedName, SelectedWhen, Sensitivity, Severity, SigAssign, Signal, Sliced, StdType, SubTypeDecl, Timed, TypeDecl, Use, VarAssign, Variable, Wait, Waveform, When, WithSelect
Instance Attribute Summary collapse
-
#label ⇒ Object
Returns the value of attribute label.
-
#pos ⇒ Object
Returns the value of attribute pos.
Instance Method Summary collapse
Instance Attribute Details
#label ⇒ Object
Returns the value of attribute label.
6 7 8 |
# File 'lib/vertigo/ast.rb', line 6 def label @label end |
#pos ⇒ Object
Returns the value of attribute pos.
7 8 9 |
# File 'lib/vertigo/ast.rb', line 7 def pos @pos end |
Instance Method Details
#accept(visitor, arg = nil) ⇒ Object
9 10 11 12 |
# File 'lib/vertigo/ast_vertigo_rkgen.rb', line 9 def accept(visitor, arg=nil) name = self.class.name.split(/::/).last visitor.send("visit#{name}".to_sym, self ,arg) # Metaprograming ! end |
#str ⇒ Object
14 15 16 17 |
# File 'lib/vertigo/ast_vertigo_rkgen.rb', line 14 def str ppr=PrettyPrinter.new self.accept(ppr) end |