ruval 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4a5bfe48a812b601be6f33a779d5aab33ef13bad130de75b7bddafb9e95dccfe
4
- data.tar.gz: d40fb1ef0a536427cb22dfdf5922208035ac0ae46b14795010d18de7f2cbd2a9
3
+ metadata.gz: 49449ee893798027cc9863a8bebc20f2f3ea205f7b10307e0aced32c40a123b6
4
+ data.tar.gz: 03fd6bf527508e2fd4bc9e232d732edfc05dda78313bdfe12c46eab030135f5c
5
5
  SHA512:
6
- metadata.gz: d1f9fd87792e9d4a0da0dfbbfefd3e4cf711d7d24bf307a83f84023283c147f044e0dc87568b91048b6608a7b8a59bed30a199974d17a4cad03a6d4f6f605487
7
- data.tar.gz: 7c62e4a9508089674c0851337a26b08f8adf6bd867d49d652f51451d02ff1ff0989703b99b61c480981a7fd04cff561f447cace1608075de6007cbd17d28034a
6
+ metadata.gz: 5cad3eff85b590f428474a33156247f2d84e8c64594a53f6f7f547a845a4e2e356e25d600f200300de755e4db62513bd7bf70c2c65940056ee115a937a956bef
7
+ data.tar.gz: 896269bed7361a5a6c1aaa42796eb5bce1e2140cafb3535b5e59d67f162624598754c57bb489ebd980cbfdaac2fff1e2ab0bdad9e17705662665f63ee53733e5
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ruval (0.1.3)
4
+ ruval (0.1.4)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -1,3 +1,8 @@
1
+ # TODO
2
+
3
+ [ ] ignore keywords inside strings. Eg the parenthesis in this line causes problems:
4
+ def good; ':)'; end
5
+
1
6
  # Ruval
2
7
 
3
8
  Consider this program:
@@ -11,7 +11,7 @@ end
11
11
  # vim: ft=ruby:syntax=ruby
12
12
 
13
13
  DEFAULT_NEWLINES = 1
14
- KEYWORDS_REGEX = /\b(?:class|module|def|if|do|end)\b/
14
+ KEYWORDS_REGEX = /\b(?:class|module|def|if|do|end)\b|[{}\[\]()]/
15
15
 
16
16
  def prog
17
17
  File.basename $0
@@ -71,7 +71,7 @@ def update_scope(line, line_stack, scope)
71
71
  return if keywords.empty? && scope.empty?
72
72
  line_stack << line
73
73
  keywords.each do |kw|
74
- unless kw == 'end'
74
+ unless %w"end } ] )".include?(kw)
75
75
  scope.push kw
76
76
  else
77
77
  scope.pop
@@ -1,3 +1,3 @@
1
1
  module Ruval
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruval
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - sergio
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-01-17 00:00:00.000000000 Z
11
+ date: 2021-01-20 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Print the value of every statement in a Ruby progam
14
14
  email: