68 lines
1.4 KiB
Plaintext
Executable File
68 lines
1.4 KiB
Plaintext
Executable File
// Comment
|
|
/*
|
|
Multi
|
|
Line
|
|
Comment
|
|
*/
|
|
[1,2,3,45 /*TODO: should be 42, obviously*/, 2016-04-21T08:10:46Z, 2016-04-21T08:10:46-08:00, 2016-04-21, 2016, 0x5, 0b0110]
|
|
(5 7 1 3 [
|
|
'a', 'b',
|
|
null, null.int, null.bool, null.list,
|
|
true, false,
|
|
nan, -inf, +inf,
|
|
"str",
|
|
"str with embedded \" ",
|
|
'''str with embedded \''' ''',
|
|
{{"clob content"}},
|
|
{{ AB/ }}
|
|
])
|
|
|
|
'''
|
|
|
|
multi
|
|
line
|
|
string
|
|
|
|
'''
|
|
|
|
states::{
|
|
// https://amzn.github.io/ion-docs/docs/spec.html
|
|
root: rules::[
|
|
include::'value'
|
|
],
|
|
|
|
// https://amzn.github.io/ion-docs/docs/spec.html#string
|
|
string: rules::[
|
|
match :: {
|
|
regex: "(\\\")((?:\\\\\"|[^\"])*)(\\\")",
|
|
token: ['string.dblq.punc.start', 'string.dblq', 'string.dblq.punc.end']
|
|
},
|
|
push::{
|
|
regex: "\'{3}",
|
|
token: 'string.trpq.punc.start',
|
|
states: rules::[
|
|
pop :: {
|
|
regex: "\'{3}",
|
|
token: 'string.trpq.punc.end',
|
|
},
|
|
match::{
|
|
regex: "(?:\\\\'*|.|[^']*)",
|
|
token: 'string.trpq'
|
|
}
|
|
]
|
|
},
|
|
],
|
|
|
|
/*
|
|
...
|
|
*/
|
|
}
|
|
{
|
|
"json": {
|
|
"compatibility": true,
|
|
"open sourced": "2016-04-21T08:10:46Z",
|
|
"foo": 9,
|
|
"bar": 1.1,
|
|
"baz": [{"id": 1}, {"id":2}]
|
|
}
|
|
} |