rbscmlex 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2ac1672aabaa3f5da45e737b0a662488a9a3fdddfc543b2c5b5835576bbbcb9d
4
- data.tar.gz: aadf9ea25326c7b0b45335b99f6d31d7a7540f0b812d8b39434c40977a48f053
3
+ metadata.gz: 1d945c95432fbcd698af635fd0d4a9e0f54a468270fc6f6e8c5a69df7202b1f3
4
+ data.tar.gz: b359cb4c75e7082e961714d0994ed3d503a81796bbbf51c489c6e32c62dfc819
5
5
  SHA512:
6
- metadata.gz: 2dd3a53f7bc19f8b56aed51383cdeff7dff1e351822a3971558933690918d66147a599bba5f28c68782a6511bda7d811780fdaef11fe0226716b16204ca3edec
7
- data.tar.gz: 27a1df5414a12c1db2d074e39ab81a11c0c89aeee913b9644b611ac45d099164a67b50113b713e9a63f88eb0617633f0074a29a08b64c39b5cedabf77c00bfb1
6
+ metadata.gz: 6f3da67c6a2479b94fb9a7fff6c6c89c03e0f386f94418a16d3ff751e505839f62deb2437127607e7259d51e1c8204c7583e3d5207c944ba0114b996f7f212bb
7
+ data.tar.gz: c0a68a273da923404f3cc3051f5850250076edff9bb4637523f3b5667862d7c6b1d64b348998c0c8c2f8604f10daf364c3918928cccd0304f7ed6468585ca289
data/CHANGELOG.md CHANGED
@@ -7,5 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
7
7
  ## [Unreleased]
8
8
  - (nothing to record here)
9
9
 
10
+ ## [0.1.1] - 2021-05-06
11
+ ### Fixed
12
+ - Fix issue #1: `rbscmlex` fails to read from STDIN.
13
+
10
14
  ## [0.1.0] - 2021-05-06
11
15
  - Initial release
data/exe/rbscmlex CHANGED
@@ -79,7 +79,7 @@ else
79
79
  Kernel.loop {
80
80
  src_line = Readline::readline("Rbscmlex> ")
81
81
  break if src_line.nil?
82
- lex = Rbscmlex::Lexer.new(src_line, type: type)
82
+ lex = Rbscmlex::Lexer.new(src_line, form: form)
83
83
  Kernel.loop { of.puts lex.next_token }
84
84
  }
85
85
  end
@@ -50,9 +50,9 @@ module Rbscmlex
50
50
  when :token
51
51
  Token.new(type, literal)
52
52
  when :hash
53
- {type: type, literal: literal}
53
+ make_hash(type, literal)
54
54
  when :json
55
- JSON.generate(to_hash)
55
+ JSON.generate(make_hash(type, literal))
56
56
  else
57
57
  raise InvalidConversionTypeError, "cannot generate #{type} as token"
58
58
  end
@@ -64,6 +64,12 @@ module Rbscmlex
64
64
  TOKEN_TYPES.include?(type)
65
65
  end
66
66
 
67
+ # Returns a new Hash object with type and literal.
68
+
69
+ def make_hash(type, literal)
70
+ {type: type, literal: literal}
71
+ end
72
+
67
73
  # Converts a Hash object, which has type and literal as its key,
68
74
  # to a new token object. The value associated to type of the Hash
69
75
  # must be valid token type. Otherwise, raises UnknownTokenTypeError.
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Rbscmlex
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.1"
5
5
  RELEASE = "2021-05-06"
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rbscmlex
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - mnbi