rgviz 0.15 → 0.17

Sign up to get free protection for your applications and to get access to all the features.
data/lib/rgviz/lexer.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  module Rgviz
2
2
  class Lexer
3
3
  def initialize(str)
4
- @str = str.chars.to_a
4
+ @str = (str || '').chars.to_a
5
5
  @len = @str.length
6
6
  @token = Token.new
7
7
  @p = 0
data/lib/rgviz/visitor.rb CHANGED
@@ -1,16 +1,16 @@
1
1
  module Rgviz
2
2
  class Visitor
3
- ['Query', 'Select', 'GroupBy', 'Pivot', 'OrderBy',
4
- 'Sort', 'Where', 'Label', 'Format', 'Option',
5
- 'BinaryExpression', 'UnaryExpression',
6
- 'IdColumn', 'NumberColumn', 'StringColumn',
7
- 'BooleanColumn', 'DateColumn', 'DateTimeColumn',
8
- 'TimeOfDayColumn', 'ScalarFunctionColumn', 'AggregateColumn'].each do |name|
9
- define_method "visit#{name}" do |node|
3
+ ['query', 'select', 'group_by', 'pivot', 'order_by',
4
+ 'sort', 'where', 'label', 'format', 'option',
5
+ 'binary_Expression', 'unary_expression',
6
+ 'id_column', 'number_column', 'string_column',
7
+ 'boolean_column', 'date_column', 'date_time_column',
8
+ 'time_of_day_column', 'scalar_function_column', 'aggregate_column'].each do |name|
9
+ define_method "visit_#{name}" do |node|
10
10
  true
11
11
  end
12
12
 
13
- define_method "endVisit#{name}" do |node|
13
+ define_method "end_visit_#{name}" do |node|
14
14
  true
15
15
  end
16
16
  end
metadata CHANGED
@@ -1,12 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rgviz
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 41
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
- - 15
9
- version: "0.15"
8
+ - 17
9
+ version: "0.17"
10
10
  platform: ruby
11
11
  authors:
12
12
  - Ary Borenszweig