Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update test-support/cairo-snippets.gen.ts #32

Merged
merged 1 commit into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions test-support/cairo-snippets.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ export default [
"fn f(ref _: felt252) {}",
"fn f(ref mod: felt252) {}",
"fn f(x: felt252) {\n let x = 5;\n match x {\n 0 | 1 => 1,\n _ => 2,\n };\n}",
"fn f<+I[a : b], impl C: G<A, B>[c],T[a:b]>() {}",
"fn foo (x:T) -> S\n{\n let x = -5 + 3;\n let y : T = x*2 + 3*5; // Comment.\n let z = ;\n let v = bool::True == false;\n 5 + Struct{a: 5, b: Struct2{_gg: ()}};\n return df == 6;\n x + y\n}\n\npub impl A of B {\n fn foo() {\n if bla.\n // The module below should parse correctly, not inside this impl.\n }\n}\n\npub mod my_mod{\n fn bar (x:T0, s: S) -> X {\n x.a *+-. s.s * foo(1,3)\n }\n struct A{\n x: a, // Comment.\n y: int\n }\n\n}\n\nskipped tokens\n",
"fn foo() -> Aaaaa Bbb + Cc {\n}",
"fn foo() -> Aaaaa Bbb + Cc; let x = 0; }",
Expand Down
47 changes: 47 additions & 0 deletions test/snapshots/809284969b.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
//! > cairo_code
fn f<+I[a : b], impl C: G<A, B>[c],T[a:b]>() {}

//! > syntax
fn source.cairo meta.function.definition.cairo keyword.other.fn.cairo
␣ source.cairo meta.function.definition.cairo
f source.cairo meta.function.definition.cairo entity.name.function.cairo
< source.cairo meta.function.definition.cairo punctuation.brackets.angle.cairo
+ source.cairo meta.function.definition.cairo keyword.operator.math.cairo
I source.cairo meta.function.definition.cairo entity.name.type.cairo
[ source.cairo meta.function.definition.cairo punctuation.brackets.square.cairo
a source.cairo meta.function.definition.cairo variable.other.cairo
␣ source.cairo meta.function.definition.cairo
: source.cairo meta.function.definition.cairo keyword.operator.key-value.cairo
␣ source.cairo meta.function.definition.cairo
b source.cairo meta.function.definition.cairo variable.other.cairo
] source.cairo meta.function.definition.cairo punctuation.brackets.square.cairo
, source.cairo meta.function.definition.cairo punctuation.comma.cairo
␣ source.cairo meta.function.definition.cairo
impl source.cairo meta.function.definition.cairo keyword.other.cairo
␣ source.cairo meta.function.definition.cairo
C source.cairo meta.function.definition.cairo entity.name.type.cairo
: source.cairo meta.function.definition.cairo keyword.operator.key-value.cairo
␣ source.cairo meta.function.definition.cairo
G source.cairo meta.function.definition.cairo entity.name.type.cairo
< source.cairo meta.function.definition.cairo punctuation.brackets.angle.cairo
A source.cairo meta.function.definition.cairo entity.name.type.cairo
, source.cairo meta.function.definition.cairo punctuation.comma.cairo
␣ source.cairo meta.function.definition.cairo
B source.cairo meta.function.definition.cairo entity.name.type.cairo
> source.cairo meta.function.definition.cairo punctuation.brackets.angle.cairo
[ source.cairo meta.function.definition.cairo punctuation.brackets.square.cairo
c source.cairo meta.function.definition.cairo variable.other.cairo
] source.cairo meta.function.definition.cairo punctuation.brackets.square.cairo
, source.cairo meta.function.definition.cairo punctuation.comma.cairo
T source.cairo meta.function.definition.cairo entity.name.type.cairo
[ source.cairo meta.function.definition.cairo punctuation.brackets.square.cairo
a source.cairo meta.function.definition.cairo variable.other.cairo
: source.cairo meta.function.definition.cairo keyword.operator.key-value.cairo
b source.cairo meta.function.definition.cairo variable.other.cairo
] source.cairo meta.function.definition.cairo punctuation.brackets.square.cairo
> source.cairo meta.function.definition.cairo punctuation.brackets.angle.cairo
( source.cairo meta.function.definition.cairo punctuation.brackets.round.cairo
) source.cairo meta.function.definition.cairo punctuation.brackets.round.cairo
␣ source.cairo meta.function.definition.cairo
{ source.cairo meta.function.definition.cairo punctuation.brackets.curly.cairo
} source.cairo punctuation.brackets.curly.cairo
Loading