-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add support for single quoted strings
see #5
- Loading branch information
Showing
16 changed files
with
198 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
ql-ascii: ! "#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ | ||
js-ascii: "! \"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~" | ||
ml-ascii: | ||
''' | ||
! "#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ | ||
''' | ||
{ | ||
ql-ascii: ! "#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ | ||
js-ascii: "! \"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~" | ||
ml-ascii: | ||
''' | ||
! "#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ | ||
''' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
foo3a: asdf''' | ||
foo3b: "'''asdf" | ||
foo4a: "asdf'''\nasdf" | ||
foo4b: "asdf\n'''asdf" | ||
"key \"": a key in single quotes | ||
"key 2": a key in single quotes | ||
key1: a key in single quotes | ||
text: | ||
[ | ||
single quoted string | ||
'''You need quotes for escapes''' | ||
" untrimmed " | ||
"untrimmed " | ||
containing " double quotes | ||
containing " double quotes | ||
containing " double quotes | ||
'''"containing more " double quotes"''' | ||
containing ' single quotes | ||
containing ' single quotes | ||
containing ' single quotes | ||
"'containing more ' single quotes'" | ||
"'containing more ' single quotes'" | ||
"\n" | ||
" \n" | ||
"\n \n \n \n" | ||
"\t\n" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"foo3a": "asdf'''", | ||
"foo3b": "'''asdf", | ||
"foo4a": "asdf'''\nasdf", | ||
"foo4b": "asdf\n'''asdf", | ||
"key \"": "a key in single quotes", | ||
"key 2": "a key in single quotes", | ||
"key1": "a key in single quotes", | ||
"text": [ | ||
"single quoted string", | ||
"You need quotes\tfor escapes", | ||
" untrimmed ", | ||
"untrimmed ", | ||
"containing \" double quotes", | ||
"containing \" double quotes", | ||
"containing \" double quotes", | ||
"\"containing more \" double quotes\"", | ||
"containing ' single quotes", | ||
"containing ' single quotes", | ||
"containing ' single quotes", | ||
"'containing more ' single quotes'", | ||
"'containing more ' single quotes'", | ||
"\n", | ||
" \n", | ||
"\n \n \n \n", | ||
"\t\n" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
key1: a key in single quotes | ||
"key 2": a key in single quotes | ||
"key \"": a key in single quotes | ||
text: | ||
[ | ||
single quoted string | ||
'''You need quotes for escapes''' | ||
" untrimmed " | ||
"untrimmed " | ||
containing " double quotes | ||
containing " double quotes | ||
containing " double quotes | ||
'''"containing more " double quotes"''' | ||
containing ' single quotes | ||
containing ' single quotes | ||
containing ' single quotes | ||
"'containing more ' single quotes'" | ||
"'containing more ' single quotes'" | ||
"\n" | ||
" \n" | ||
"\n \n \n \n" | ||
"\t\n" | ||
] | ||
foo3a: asdf''' | ||
foo3b: "'''asdf" | ||
foo4a: "asdf'''\nasdf" | ||
foo4b: "asdf\n'''asdf" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"key1": "a key in single quotes", | ||
"key 2": "a key in single quotes", | ||
"key \"": "a key in single quotes", | ||
"text": [ | ||
"single quoted string", | ||
"You need quotes\tfor escapes", | ||
" untrimmed ", | ||
"untrimmed ", | ||
"containing \" double quotes", | ||
"containing \" double quotes", | ||
"containing \" double quotes", | ||
"\"containing more \" double quotes\"", | ||
"containing ' single quotes", | ||
"containing ' single quotes", | ||
"containing ' single quotes", | ||
"'containing more ' single quotes'", | ||
"'containing more ' single quotes'", | ||
"\n", | ||
" \n", | ||
"\n \n \n \n", | ||
"\t\n" | ||
], | ||
"foo3a": "asdf'''", | ||
"foo3b": "'''asdf", | ||
"foo4a": "asdf'''\nasdf", | ||
"foo4b": "asdf\n'''asdf" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
# Hjson 3 allows the use of single quotes | ||
|
||
'key1': a key in single quotes | ||
'key 2': a key in single quotes | ||
'key "': a key in single quotes | ||
|
||
text: [ | ||
'single quoted string' | ||
'You need quotes\tfor escapes' | ||
' untrimmed ' | ||
'untrimmed ' | ||
'containing " double quotes' | ||
'containing \" double quotes' | ||
"containing \" double quotes" | ||
'"containing more " double quotes"' | ||
'containing \' single quotes' | ||
"containing ' single quotes" | ||
"containing \' single quotes" | ||
"'containing more ' single quotes'" | ||
"\'containing more \' single quotes\'" | ||
|
||
'\n' | ||
' \n' | ||
'\n \n \n \n' | ||
'\t\n' | ||
] | ||
|
||
# escapes/no escape | ||
|
||
foo3a: 'asdf\'\'\'' | ||
foo3b: '\'\'\'asdf' | ||
|
||
foo4a: 'asdf\'\'\'\nasdf' | ||
foo4b: 'asdf\n\'\'\'asdf' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
// the following line contains trailing whitespace: | ||
foo: 0 -- this string starts at 0 and ends at 1, preceding and trailing whitespace is ignored -- 1 | ||
{ | ||
// the following line contains trailing whitespace: | ||
foo: 0 -- this string starts at 0 and ends at 1, preceding and trailing whitespace is ignored -- 1 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters