kaiser-ruby 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/Gemfile.lock +1 -1
- data/bin/console +2 -10
- data/lib/kaiser_ruby/rockstar_parser.rb +1 -1
- data/lib/kaiser_ruby/rockstar_transform.rb +1 -1
- data/lib/kaiser_ruby/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b00ca7f4d8ab7606f8a9933971ccdaec79b33c49bdbeb1eca54a812d1ca001d3
|
4
|
+
data.tar.gz: a30cea8a7445ec593eef4eac9ef33e0598b7b762d17081c692e7ea7c9da69066
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 433f27ff2a343efd7ffd467a3d618f2c8d9c203d457da59da80b2ad56d87a353d1d1047ab96825607754dec23fe14d2aff882e7742f7fbed7a1455b27d3fa9ea
|
7
|
+
data.tar.gz: 9bc1c414c8607297b046ec89d9f47a8617e6a0a526fb4e6990ed1797c16528bc242e8d0d00e9513485a60efc8c4fa924300ce8f7d01bbc730d3bd93504322c5a
|
data/CHANGELOG.md
CHANGED
@@ -40,6 +40,8 @@ Language Implementation:
|
|
40
40
|
- [x] Handle input from STDIN
|
41
41
|
- [x] Handle contractions - "Janie's got a gun" should be expanded to "Janie is got a gun" and so it should transpile to "janie = 313"
|
42
42
|
- [x] Handle pronouns - he, she, it, and others should refer to the last used variable
|
43
|
+
- [x] Better handle input of integers from STDIN
|
44
|
+
- [x] Print can print returned values from functions
|
43
45
|
|
44
46
|
Other stuff:
|
45
47
|
|
@@ -47,3 +49,4 @@ Other stuff:
|
|
47
49
|
- [x] Catch exceptions in the REPL
|
48
50
|
- [x] Suppressed warning about eval from Thor
|
49
51
|
- [x] Move nesting indentation from main module to transformer
|
52
|
+
- [x] Celsius to Fahrenheit example
|
data/Gemfile.lock
CHANGED
data/bin/console
CHANGED
@@ -2,13 +2,5 @@
|
|
2
2
|
|
3
3
|
require "bundler/setup"
|
4
4
|
require "kaiser_ruby"
|
5
|
-
|
6
|
-
|
7
|
-
# with your gem easier. You can also use a different console, if you like.
|
8
|
-
|
9
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
-
# require "pry"
|
11
|
-
# Pry.start
|
12
|
-
|
13
|
-
require "irb"
|
14
|
-
IRB.start(__FILE__)
|
5
|
+
require "pry"
|
6
|
+
Pry.start
|
@@ -51,7 +51,7 @@ module KaiserRuby
|
|
51
51
|
rule(print: { output: simple(:output) }) { "puts #{output}" }
|
52
52
|
rule(continue: simple(:_)) { "next" }
|
53
53
|
rule(break: simple(:_)) { "break" }
|
54
|
-
rule(input_variable: simple(:var)) { "print '> '\n#{var} =
|
54
|
+
rule(input_variable: simple(:var)) { "print '> '\n__input = STDIN.gets.chomp\n#{var} = Integer(__input) rescue input" }
|
55
55
|
|
56
56
|
rule(equals: { left: simple(:left), right: simple(:right) }) { "#{left} == #{right}" }
|
57
57
|
rule(not_equals: { left: simple(:left), right: simple(:right) }) { "#{left} != #{right}" }
|
data/lib/kaiser_ruby/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kaiser-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marcin Ruszkiewicz
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-08-
|
11
|
+
date: 2018-08-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|