rbexy 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/rbexy/lexer.rb +14 -2
- data/lib/rbexy/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: ffe916002997f23b1aab2e81aaf94cf8bab0083d8e47bd72eee204d8058a871f
|
4
|
+
data.tar.gz: fb54d1d98b6272c716059b4dcde6bafdc02baaf1025e79bdf2590a6ebdef148d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0c6590b2796a338efdef40dd2c6fe21b324c8397f8d79e3f4b2535a1d2ae522942b41cecc71d753e98c4df1beb88731c104fd742d1a5adfe903c8b9701a8a031
|
7
|
+
data.tar.gz: a182b48b4cd539e96d502ea4579bac7c8204bf0e1a840d8b62f931b63ddc682d45afb01d50aa3d6140dfd1d7d9b4f70ca631b48f8861d813a1dd1fd70fd973eb
|
data/Gemfile.lock
CHANGED
data/lib/rbexy/lexer.rb
CHANGED
@@ -115,7 +115,7 @@ module Rbexy
|
|
115
115
|
expression_inner_single_quote
|
116
116
|
elsif scanner.scan(Patterns.open_tag_def)
|
117
117
|
potential_expression_inner_tag
|
118
|
-
elsif
|
118
|
+
elsif expression_content?
|
119
119
|
self.curr_expr += scanner.matched
|
120
120
|
else
|
121
121
|
raise SyntaxError, self
|
@@ -132,7 +132,7 @@ module Rbexy
|
|
132
132
|
expression_inner_single_quote
|
133
133
|
elsif scanner.scan(Patterns.open_tag_def)
|
134
134
|
potential_expression_inner_tag
|
135
|
-
elsif
|
135
|
+
elsif expression_content?
|
136
136
|
self.curr_expr += scanner.matched
|
137
137
|
else
|
138
138
|
raise SyntaxError, self
|
@@ -237,6 +237,7 @@ module Rbexy
|
|
237
237
|
end
|
238
238
|
|
239
239
|
def potential_expression_inner_tag
|
240
|
+
# binding.pry
|
240
241
|
if self.curr_expr =~ Patterns.expression_internal_tag_prefixes
|
241
242
|
tokens << [:EXPRESSION_BODY, curr_expr]
|
242
243
|
self.curr_expr = ""
|
@@ -275,5 +276,16 @@ module Rbexy
|
|
275
276
|
self.curr_expr += scanner.getch
|
276
277
|
stack.pop unless curr_expr.end_with?('\\')
|
277
278
|
end
|
279
|
+
|
280
|
+
def expression_content?
|
281
|
+
# Patterns.expression_content ends at `<` characters, because we need to
|
282
|
+
# separately scan for allowed open_tag_defs within expressions. We should
|
283
|
+
# support any found open_tag_ends as expression content, as that means the
|
284
|
+
# open_tag_def was not considered allowed (or stack would be inside
|
285
|
+
# :tag_def instead of :expression) so we should thus also consider the
|
286
|
+
# open_tag_end to just be a part of the expression (maybe its in a string,
|
287
|
+
# etc).
|
288
|
+
scanner.scan(Patterns.expression_content) || scanner.scan(Patterns.open_tag_end)
|
289
|
+
end
|
278
290
|
end
|
279
291
|
end
|
data/lib/rbexy/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rbexy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Giancola
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-10-
|
11
|
+
date: 2020-10-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|