Skip to content

Instantly share code, notes, and snippets.

@arendjr
Created August 2, 2024 18:45
Show Gist options
  • Save arendjr/caee254ed32eb85ff00bff778300e777 to your computer and use it in GitHub Desktop.
Save arendjr/caee254ed32eb85ff00bff778300e777 to your computer and use it in GitHub Desktop.
AstNode(
GritNodePattern {
kind: JsSyntaxKind(
JS_LOGICAL_EXPRESSION,
),
args: [
GritNodePatternArg {
slot_index: 0,
pattern: AstNode(
GritNodePattern {
kind: JsSyntaxKind(
JS_IDENTIFIER_EXPRESSION,
),
args: [
GritNodePatternArg {
slot_index: 0,
pattern: AstNode(
GritNodePattern {
kind: JsSyntaxKind(
JS_REFERENCE_IDENTIFIER,
),
args: [
GritNodePatternArg {
slot_index: 0,
pattern: AstLeafNode(
GritLeafNodePattern {
kind: JsSyntaxKind(
IDENT,
),
equivalence_class: None,
text: "$fn",
},
),
},
],
},
),
},
],
},
),
},
GritNodePatternArg {
slot_index: 1,
pattern: AstLeafNode(
GritLeafNodePattern {
kind: JsSyntaxKind(
AMP2,
),
equivalence_class: None,
text: "&&",
},
),
},
GritNodePatternArg {
slot_index: 2,
pattern: AstNode(
GritNodePattern {
kind: JsSyntaxKind(
JS_CALL_EXPRESSION,
),
args: [
GritNodePatternArg {
slot_index: 0,
pattern: AstNode(
GritNodePattern {
kind: JsSyntaxKind(
JS_IDENTIFIER_EXPRESSION,
),
args: [
GritNodePatternArg {
slot_index: 0,
pattern: AstNode(
GritNodePattern {
kind: JsSyntaxKind(
JS_REFERENCE_IDENTIFIER,
),
args: [
GritNodePatternArg {
slot_index: 0,
pattern: AstLeafNode(
GritLeafNodePattern {
kind: JsSyntaxKind(
IDENT,
),
equivalence_class: None,
text: "$fn",
},
),
},
],
},
),
},
],
},
),
},
GritNodePatternArg {
slot_index: 1,
pattern: Dynamic(
Snippet(
DynamicSnippet {
parts: [
String(
"",
),
],
},
),
),
},
GritNodePatternArg {
slot_index: 2,
pattern: Dynamic(
Snippet(
DynamicSnippet {
parts: [
String(
"",
),
],
},
),
),
},
GritNodePatternArg {
slot_index: 3,
pattern: AstNode(
GritNodePattern {
kind: JsSyntaxKind(
JS_CALL_ARGUMENTS,
),
args: [
GritNodePatternArg {
slot_index: 0,
pattern: AstLeafNode(
GritLeafNodePattern {
kind: JsSyntaxKind(
L_PAREN,
),
equivalence_class: None,
text: "(",
},
),
},
GritNodePatternArg {
slot_index: 1,
pattern: List(
List {
patterns: [],
},
),
},
GritNodePatternArg {
slot_index: 2,
pattern: AstLeafNode(
GritLeafNodePattern {
kind: JsSyntaxKind(
R_PAREN,
),
equivalence_class: None,
text: ")",
},
),
},
],
},
),
},
],
},
),
},
],
},
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment