mirror of
https://github.com/Noratrieb/riverdelta.git
synced 2026-03-15 20:56:07 +01:00
some stuff
This commit is contained in:
parent
ef32e646d6
commit
91b183c002
11 changed files with 4320 additions and 101 deletions
84
src/__snapshots__/lexer.test.ts.snap
Normal file
84
src/__snapshots__/lexer.test.ts.snap
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`should tokenize an emtpy function 1`] = `
|
||||
[
|
||||
{
|
||||
"kind": "kw_function",
|
||||
"span": {
|
||||
"end": 8,
|
||||
"start": 0,
|
||||
},
|
||||
},
|
||||
{
|
||||
"ident": "hello",
|
||||
"kind": "identifier",
|
||||
"span": {
|
||||
"end": 14,
|
||||
"start": 9,
|
||||
},
|
||||
},
|
||||
{
|
||||
"kind": "p_popen",
|
||||
"span": {
|
||||
"end": 15,
|
||||
"start": 14,
|
||||
},
|
||||
},
|
||||
{
|
||||
"kind": "p_pclose",
|
||||
"span": {
|
||||
"end": 16,
|
||||
"start": 15,
|
||||
},
|
||||
},
|
||||
{
|
||||
"kind": "p_bopen",
|
||||
"span": {
|
||||
"end": 18,
|
||||
"start": 17,
|
||||
},
|
||||
},
|
||||
{
|
||||
"kind": "p_bclose",
|
||||
"span": {
|
||||
"end": 19,
|
||||
"start": 18,
|
||||
},
|
||||
},
|
||||
]
|
||||
`;
|
||||
|
||||
exports[`should tokenize hello world 1`] = `
|
||||
[
|
||||
{
|
||||
"ident": "print",
|
||||
"kind": "identifier",
|
||||
"span": {
|
||||
"end": 5,
|
||||
"start": 0,
|
||||
},
|
||||
},
|
||||
{
|
||||
"kind": "p_popen",
|
||||
"span": {
|
||||
"end": 6,
|
||||
"start": 5,
|
||||
},
|
||||
},
|
||||
{
|
||||
"kind": "lit_string",
|
||||
"span": {
|
||||
"end": 19,
|
||||
"start": 6,
|
||||
},
|
||||
"value": "hello world",
|
||||
},
|
||||
{
|
||||
"kind": "p_pclose",
|
||||
"span": {
|
||||
"end": 20,
|
||||
"start": 19,
|
||||
},
|
||||
},
|
||||
]
|
||||
`;
|
||||
Loading…
Add table
Add a link
Reference in a new issue