Skip to content

Commit

Permalink
Update test-support/cairo-snippets.gen.ts
Browse files Browse the repository at this point in the history
commit-id:fe293e4e
  • Loading branch information
Draggu committed Dec 16, 2024
1 parent 7652560 commit 104501a
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
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

0 comments on commit 104501a

Please sign in to comment.