Class: MetaCommit::Contracts::Ast

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Instance Attribute Details

#parser_classClass

class which was used to parse this ast

Returns:

  • (Class)

    the current value of parser_class



4
5
6
# File 'lib/meta_commit_contracts/ast.rb', line 4

def parser_class
  @parser_class
end

Instance Method Details

#childrenArray<MetaCommit::Contracts::Ast>

Returns children ast.

Returns:



9
10
11
# File 'lib/meta_commit_contracts/ast.rb', line 9

def children

end

#first_lineInteger?

Returns line number where ast starts.

Returns:

  • (Integer, nil)

    line number where ast starts



14
15
16
# File 'lib/meta_commit_contracts/ast.rb', line 14

def first_line

end

#last_lineInteger?

Returns line number where ast ends.

Returns:

  • (Integer, nil)

    line number where ast ends



19
20
21
# File 'lib/meta_commit_contracts/ast.rb', line 19

def last_line

end