tree-sitter-ekon
Version:
EKON grammar for tree-sitter
173 lines (144 loc) • 1.96 kB
Plain Text
==================
Root object
==================
hello: 1
----
(document
(object
(pair (string) (number))
)
)
===================
Arrays
===================
[
345
10.1
10
-1_0
null
true
false
{
hello: world
this: ^1201
"yo": +1e12
'hey': 'jude'
},
]
(document
(array
(number)
(number)
(number)
(number)
(null)
(true)
(false)
(object
(pair (string) (string))
(pair (string) (string))
(pair (string) (number))
(pair (string) (string))
)
)
)
=====================
String content
=====================
[
'multi
line
string
'
'abc',
hello
'def\n',
'ghi\t'
'hello\''
'double\"'
]
----
(document
(array (string) (string) (string) (string) (string) (string) (string))
)
================================
numbers
================================
[
-1
-1_12_1233_11.1222_21e-133_133
001
0b11
{
1: 01
}
]
(document (array
(number)
(number)
(string)
(number)
(object (pair (string) (string)))
))
================================
Top-level null
================================
null
(document (null))
===============================
Top-level object
===============================
{
hello: 1
}
-----
(document (object (pair (string) (number))))
===============================
comments
===============================
// hello
{
hello
// there is a comment here
:
// also
1,
yo: [ // here
// hey
1,
hello,
there,
github.com/Himujjal
]
}
// hello there
-----
(document
(comment)
(object
(pair (string) (comment) (comment) (number))
(pair
(string)
(array
(comment) (comment) (number) (string) (string) (string)
)
)
)
(comment)
)
============================
schema
============================
`
this is a schema
`
hello: -1_1.0_1e-1_2
------
(document
(schema)
(object (pair (string) (number)))
)