kalculator 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/kalculator/evaluator.rb +4 -0
- data/lib/kalculator/lexer.rb +1 -0
- data/lib/kalculator/parser.rb +1 -0
- data/lib/kalculator/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a86a3a471fd726634a4f8417a6ce273c2a06c577
|
4
|
+
data.tar.gz: 6c806defc93c0a68a7a4cf175a76dbbdcfdbb41c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 524bc87684c499ac83d0a715b271ae471f39ec53dc8514f05ad2eae9c41c4c2cc4f2909dd8a7ca5293d067141eab0a71537072609443d08b33a0cbfb8a28d77a
|
7
|
+
data.tar.gz: 143504c4a02aa61d35ba2103ced6c879a754b12c2304ecee67ff6381b2fb4c4830462868c24de5db014ccd99eece7a3b2774b91f3c79fb305dcca6a42e7fbc87
|
data/lib/kalculator/evaluator.rb
CHANGED
data/lib/kalculator/lexer.rb
CHANGED
data/lib/kalculator/parser.rb
CHANGED
@@ -16,6 +16,7 @@ class Kalculator
|
|
16
16
|
clause('LPAREN expression RPAREN') { |_, expression, _| expression }
|
17
17
|
|
18
18
|
clause('NUMBER') { |n| [:number, n] }
|
19
|
+
clause('STRING') { |s| [:string, s] }
|
19
20
|
clause('IDENT') { |n| [:variable, n.split(".")] }
|
20
21
|
clause('TRUE') { |n| [:boolean, true] }
|
21
22
|
clause('FALSE') { |n| [:boolean, false] }
|
data/lib/kalculator/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kalculator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Ries
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-04-
|
11
|
+
date: 2018-04-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rltk
|