opulent 1.6.9 → 1.7.0

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
  SHA1:
3
- metadata.gz: 7e3f7b618fb211376c089b0ec4385c5d35df67d1
4
- data.tar.gz: c274f0f86bad916e9a4ff7352b208d2e20e18783
3
+ metadata.gz: e4725037738209f23895d883b56c94866adbb606
4
+ data.tar.gz: 33953652ff3ff0a690164bf426eb9f201ab7eeff
5
5
  SHA512:
6
- metadata.gz: 36261aa3037734924516b712cca55a51f6608e5db8d02151a7ea5d86c83fa50f60d228faaf42169f7072b52e5f08a488c2085e30441ae8a514a906cbc555e7b5
7
- data.tar.gz: 03266f34abdd06a0a53f2fc6a743b7bc18aad172ebf774d3642737d4e54efd792d968a7d9a2f0742c775d5476f5819e22f3059d09c1d162c80a7635c109fc41b
6
+ metadata.gz: eb6aecbe587a2507ed10b93e555d03e485d8b87b6aa9230d6950b46972fc6e0381b92ac0081df5c8714501f16b39da18c4ed4bc5bda6e115bf021c7347697dc4
7
+ data.tar.gz: e4250d20292067ce5688553822fce21421545108629786776ea10b0074094c1d45b53fb57a713dbf09ee7120b132a347776ccad53e74c340655146480872f1f9
Binary file
@@ -55,14 +55,20 @@ module Opulent
55
55
  # hash_close: "]" token is required next
56
56
  #
57
57
  # [array_elements]
58
+ # [access][access]
58
59
  #
59
60
  def array
60
- return unless (buffer = accept :square_bracket)
61
- accept_newline
62
- buffer += array_elements
63
- accept_newline
64
- buffer += accept :'[', :*
65
- buffer
61
+ buffer = ''
62
+
63
+ while (bracket = accept :square_bracket)
64
+ buffer += bracket
65
+ accept_newline
66
+ buffer += array_elements
67
+ accept_newline
68
+ buffer += accept :'[', :*
69
+ end
70
+
71
+ buffer == '' ? nil : buffer
66
72
  end
67
73
 
68
74
  # Recursively gather expressions separated by a comma and add them to the
@@ -173,6 +179,21 @@ module Opulent
173
179
  buffer
174
180
  end
175
181
 
182
+
183
+ # Accept a ruby method call modifier
184
+ #
185
+ def method_call
186
+ method_code = ''
187
+
188
+ while (method_start = accept(:exp_method_call))
189
+ method_code += method_start
190
+ argument = call
191
+ method_code += argument if argument
192
+ end
193
+
194
+ method_code == '' ? nil : method_code
195
+ end
196
+
176
197
  # Check if it's possible to parse a ruby call literal. First, try to see
177
198
  # if the next sequence is a hash_open token: "(", and if it is, then a
178
199
  # hash_close: ")" token is required next
@@ -316,17 +337,6 @@ module Opulent
316
337
  accept(:exp_operation)
317
338
  end
318
339
 
319
- # Accept a ruby method call modifier
320
- #
321
- def method_call
322
- return unless (method_code = accept(:exp_method_call))
323
-
324
- argument = call
325
- method_code += argument if argument
326
-
327
- method_code
328
- end
329
-
330
340
  # Accept ternary operator syntax
331
341
  #
332
342
  # condition ? expression1 : expression2
@@ -1,4 +1,4 @@
1
1
  # @Opulent
2
2
  module Opulent
3
- VERSION = '1.6.9'
3
+ VERSION = '1.7.0'
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opulent
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.9
4
+ version: 1.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Grozav
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-16 00:00:00.000000000 Z
11
+ date: 2016-03-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -89,6 +89,7 @@ executables:
89
89
  extensions: []
90
90
  extra_rdoc_files: []
91
91
  files:
92
+ - ".DS_Store"
92
93
  - ".gitignore"
93
94
  - CODE_OF_CONDUCT.md
94
95
  - Gemfile