Skip to content

Commit 173a827

Browse files
authoredOct 27, 2020
Merge pull request #9 from olimsaidov/issue-6
Implement single-quoted string literal in parser
2 parents 1c2002a + 1ce829e commit 173a827

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed
 

‎spec/expressions.yml

+9
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,15 @@ tests:
208208
result:
209209
bar: -10
210210

211+
- desc: single-quoted and double-quoted string literal
212+
scope:
213+
template:
214+
foo: $ 'foo'
215+
bar: $ "bar"
216+
result:
217+
foo: foo
218+
bar: bar
219+
211220
# - desc: union operator performs union operation on it\'s operands
212221
# scope:
213222
# <<: *goessner

‎src/jute/core.cljc

+1-1
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ null-literal
253253
= 'null' !path-head-comp
254254
255255
string-literal
256-
= <'\"'> #'[^\"]*' <'\"'>
256+
= <'\"'> #'[^\"]*' <'\"'> | <\"'\"> #\"[^']*\" <\"'\">
257257
"
258258
:auto-whitespace :standard))
259259

0 commit comments

Comments
 (0)
Please sign in to comment.