rgviz 0.37 → 0.38
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/rgviz/lexer.rb +1 -1
- data/lib/rgviz/parser.rb +11 -11
- metadata +3 -3
data/lib/rgviz/lexer.rb
CHANGED
data/lib/rgviz/parser.rb
CHANGED
@@ -331,44 +331,44 @@ module Rgviz
|
|
331
331
|
def parse_atomic_column
|
332
332
|
case @token.value
|
333
333
|
when Token::ID
|
334
|
-
return value_column(IdColumn.new
|
334
|
+
return value_column(IdColumn.new(@token.string))
|
335
335
|
when Token::Contains, Token::Starts, Token::Ends, Token::With,
|
336
336
|
Token::Matches, Token::Like, Token::NoValues, Token::NoFormat,
|
337
337
|
Token::Is, Token::Null
|
338
|
-
return value_column(IdColumn.new
|
338
|
+
return value_column(IdColumn.new(@token.string))
|
339
339
|
when Token::PLUS
|
340
340
|
next_token
|
341
341
|
check Token::INTEGER, Token::DECIMAL
|
342
|
-
return value_column(NumberColumn.new
|
342
|
+
return value_column(NumberColumn.new(@token.number))
|
343
343
|
when Token::MINUS
|
344
344
|
next_token
|
345
345
|
check Token::INTEGER, Token::DECIMAL
|
346
|
-
return value_column(NumberColumn.new
|
346
|
+
return value_column(NumberColumn.new(-@token.number))
|
347
347
|
when Token::INTEGER, Token::DECIMAL
|
348
|
-
return value_column(NumberColumn.new
|
348
|
+
return value_column(NumberColumn.new(@token.number))
|
349
349
|
when Token::LPAREN
|
350
350
|
next_token
|
351
351
|
column = parse_column
|
352
352
|
check! Token::RPAREN
|
353
353
|
return column
|
354
354
|
when Token::STRING
|
355
|
-
return value_column(StringColumn.new
|
355
|
+
return value_column(StringColumn.new(@token.string))
|
356
356
|
when Token::False
|
357
|
-
return value_column(BooleanColumn.new
|
357
|
+
return value_column(BooleanColumn.new(false))
|
358
358
|
when Token::True
|
359
|
-
return value_column(BooleanColumn.new
|
359
|
+
return value_column(BooleanColumn.new(true))
|
360
360
|
when Token::Date
|
361
361
|
next_token
|
362
362
|
check Token::STRING
|
363
|
-
return value_column(DateColumn.new
|
363
|
+
return value_column(DateColumn.new(Date.parse(@token.string)))
|
364
364
|
when Token::DateTime
|
365
365
|
next_token
|
366
366
|
check Token::STRING
|
367
|
-
return value_column(DateTimeColumn.new
|
367
|
+
return value_column(DateTimeColumn.new(Time.parse(@token.string)))
|
368
368
|
when Token::TimeOfDay
|
369
369
|
next_token
|
370
370
|
check Token::STRING
|
371
|
-
return value_column(TimeOfDayColumn.new
|
371
|
+
return value_column(TimeOfDayColumn.new(Time.parse(@token.string)))
|
372
372
|
when Token::Avg, Token::Count, Token::Min, Token::Max, Token::Sum
|
373
373
|
function = @token.value
|
374
374
|
string = @token.string
|
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:
|
4
|
+
hash: 71
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: "0.
|
8
|
+
- 38
|
9
|
+
version: "0.38"
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Ary Borenszweig
|