Implement initial roc tokenizer in zig

This commit is contained in:
Joshua Warner 2025-01-31 18:33:59 -08:00
parent 5e4ff44483
commit ce8f7065db
No known key found for this signature in database
GPG key ID: 89AD497003F93FDD
8 changed files with 1497 additions and 72 deletions

View file

@ -1,74 +1,79 @@
@0-21 Defs(
Defs {
tags: [
EitherIndex(2147483648),
],
regions: [
@0-17,
],
space_before: [
Slice<roc_parse::ast::CommentOrNewline> { start: 0, length: 0 },
],
space_after: [
Slice<roc_parse::ast::CommentOrNewline> { start: 0, length: 0 },
],
spaces: [],
type_defs: [],
value_defs: [
Annotation(
@0-2 SpaceAfter(
NumLiteral(
"1P",
@0-21 SpaceAfter(
Defs(
Defs {
tags: [
EitherIndex(2147483648),
],
regions: [
@0-17,
],
space_before: [
Slice<roc_parse::ast::CommentOrNewline> { start: 0, length: 0 },
],
space_after: [
Slice<roc_parse::ast::CommentOrNewline> { start: 0, length: 0 },
],
spaces: [],
type_defs: [],
value_defs: [
Annotation(
@0-2 SpaceAfter(
NumLiteral(
"11",
),
[
Newline,
],
),
[
Newline,
],
),
@4-17 Tuple {
elems: [
@5-15 Function(
[
@5-6 Apply(
"",
"I",
[],
),
@7-8 SpaceAfter(
BoundVariable(
"s",
@4-17 Tuple {
elems: [
@5-15 Function(
[
@5-6 Apply(
"",
"I",
[],
),
[
Newline,
],
@7-8 SpaceAfter(
BoundVariable(
"s",
),
[
Newline,
],
),
@10-12 Apply(
"",
"Mw",
[],
),
],
Pure,
@14-15 BoundVariable(
"r",
),
@10-12 Apply(
"",
"Mw",
[],
),
],
Pure,
@14-15 BoundVariable(
"r",
),
],
ext: Some(
@16-17 BoundVariable(
"l",
),
),
],
ext: Some(
@16-17 BoundVariable(
"l",
),
),
},
),
],
},
@18-21 SpaceBefore(
Var {
module_name: "",
ident: "asl",
},
),
],
},
[
Newline,
],
@18-21 SpaceBefore(
Var {
module_name: "",
ident: "asl",
},
[
Newline,
],
),
),
[
Newline,
],
)

View file

@ -1,4 +1,4 @@
1P
11
:(I,s
,Mw->r)l
asl
asl