Class: MetaCommit::Contracts::Ast
- Inherits:
-
Object
- Object
- MetaCommit::Contracts::Ast
- Defined in:
- lib/meta_commit_contracts/ast.rb
Overview
Structure which is returned by parser and can be traversed to collect children node information
Instance Attribute Summary collapse
-
#parser_class ⇒ Class
class which was used to parse this ast.
Instance Method Summary collapse
-
#children ⇒ Array<MetaCommit::Contracts::Ast>
Children ast.
-
#first_column ⇒ Integer?
Column where ast starts (starting from 0).
-
#first_line ⇒ Integer?
Line number where ast starts (starting from 1).
-
#last_column ⇒ Integer?
Column where ast ends (starting from 0).
-
#last_line ⇒ Integer?
Line number where ast ends (starting from 1).
Instance Attribute Details
#parser_class ⇒ Class
class which was used to parse this ast
4 5 6 |
# File 'lib/meta_commit_contracts/ast.rb', line 4 def parser_class @parser_class end |
Instance Method Details
#children ⇒ Array<MetaCommit::Contracts::Ast>
Returns children ast.
8 9 10 |
# File 'lib/meta_commit_contracts/ast.rb', line 8 def children end |
#first_column ⇒ Integer?
Returns column where ast starts (starting from 0).
23 24 25 |
# File 'lib/meta_commit_contracts/ast.rb', line 23 def first_column end |
#first_line ⇒ Integer?
Returns line number where ast starts (starting from 1).
13 14 15 |
# File 'lib/meta_commit_contracts/ast.rb', line 13 def first_line end |
#last_column ⇒ Integer?
Returns column where ast ends (starting from 0).
28 29 30 |
# File 'lib/meta_commit_contracts/ast.rb', line 28 def last_column end |
#last_line ⇒ Integer?
Returns line number where ast ends (starting from 1).
18 19 20 |
# File 'lib/meta_commit_contracts/ast.rb', line 18 def last_line end |