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:



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

def children

end

#first_columnInteger?

Returns column where ast starts (starting from 0).

Returns:

  • (Integer, nil)

    column where ast starts (starting from 0)



23
24
25
# File 'lib/meta_commit_contracts/ast.rb', line 23

def first_column

end

#first_lineInteger?

Returns line number where ast starts (starting from 1).

Returns:

  • (Integer, nil)

    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_columnInteger?

Returns column where ast ends (starting from 0).

Returns:

  • (Integer, nil)

    column where ast ends (starting from 0)



28
29
30
# File 'lib/meta_commit_contracts/ast.rb', line 28

def last_column

end

#last_lineInteger?

Returns line number where ast ends (starting from 1).

Returns:

  • (Integer, nil)

    line number where ast ends (starting from 1)



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

def last_line

end