Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tree-sitter-python

Package Overview
Dependencies
Maintainers
5
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tree-sitter-python - npm Package Compare versions

Comparing version 0.16.1 to 0.17.0

Cargo.lock

382

grammar.js

@@ -9,2 +9,3 @@ const PREC = {

parenthesized_expression: 1,
parenthesized_list_splat: 1,
not: 1,

@@ -33,8 +34,16 @@ compare: 2,

conflicts: $ => [
[$.primary_expression, $.pattern],
[$.primary_expression, $.list_splat_pattern],
[$.tuple, $.tuple_pattern],
[$.list, $.list_pattern],
],
supertypes: $ => [
$._simple_statement,
$._compound_statement,
$._expression,
$._primary_expression,
$._parameter,
$.expression,
$.primary_expression,
$.pattern,
$.parameter,
],

@@ -54,5 +63,6 @@

$._compound_statement,
$._suite,
$._expressions,
$._left_hand_side,
$.keyword_identifier,
$._suite,
$._parameter,
],

@@ -156,3 +166,3 @@

$.chevron,
repeat(seq(',', field('argument', $._expression))),
repeat(seq(',', field('argument', $.expression))),
optional(','))

@@ -162,3 +172,3 @@ ),

'print',
commaSep1(field('argument', $._expression)),
commaSep1(field('argument', $.expression)),
optional(','))

@@ -170,3 +180,3 @@ )

'>>',
$._expression
$.expression
),

@@ -176,8 +186,8 @@

'assert',
commaSep1($._expression)
commaSep1($.expression)
),
expression_statement: $ => choice(
$._expression,
seq(commaSep1($._expression), optional(',')),
$.expression,
seq(commaSep1($.expression), optional(',')),
$.assignment,

@@ -191,3 +201,3 @@ $.augmented_assignment,

':=',
field('value', $._expression)
field('value', $.expression)
),

@@ -197,3 +207,3 @@

'return',
optional($.expression_list)
optional($._expressions)
),

@@ -203,2 +213,7 @@

'del',
$._expressions
),
_expressions: $ => choice(
$.expression,
$.expression_list

@@ -209,4 +224,4 @@ ),

'raise',
optional($.expression_list),
optional(seq('from', field('cause', $._expression)))
optional($._expressions),
optional(seq('from', field('cause', $.expression)))
),

@@ -218,3 +233,3 @@

// Compount statements
// Compound statements

@@ -234,3 +249,3 @@ _compound_statement: $ => choice(

'if',
field('condition', $._expression),
field('condition', $.expression),
':',

@@ -244,3 +259,3 @@ field('consequence', $._suite),

'elif',
field('condition', $._expression),
field('condition', $.expression),
':',

@@ -259,5 +274,5 @@ field('consequence', $._suite)

'for',
field('left', $.variables),
field('left', $._left_hand_side),
'in',
field('right', $.expression_list),
field('right', $._expressions),
':',

@@ -270,3 +285,3 @@ field('body', $._suite),

'while',
field('condition', $._expression),
field('condition', $.expression),
':',

@@ -294,6 +309,6 @@ field('body', $._suite),

optional(seq(
$._expression,
$.expression,
optional(seq(
choice('as', ','),
$._expression
$.expression
))

@@ -320,6 +335,6 @@ )),

with_item: $ => seq(
field('value', $._expression),
field('value', $.expression),
optional(seq(
'as',
field('alias', $._expression)
field('alias', $.pattern)
))

@@ -351,38 +366,5 @@ ),

_parameters: $ => seq(
commaSep1($._parameter),
optional(',')
),
_parameter: $ => choice(
$.identifier,
$.keyword_identifier,
$.tuple,
$.typed_parameter,
$.default_parameter,
$.typed_default_parameter,
choice(
$.list_splat,
alias('*', $.list_splat),
),
$.dictionary_splat
),
default_parameter: $ => seq(
field('name', choice($.identifier, $.keyword_identifier)),
'=',
field('value', $._expression)
),
typed_default_parameter: $ => prec(PREC.typed_parameter, seq(
field('name', choice($.identifier, $.keyword_identifier)),
':',
field('type', $.type),
'=',
field('value', $._expression)
)),
list_splat: $ => seq(
'*',
$._expression,
$.expression,
),

@@ -392,3 +374,3 @@

'**',
$._expression
$.expression
),

@@ -412,3 +394,3 @@

'in',
commaSep1($._expression)
commaSep1($.expression)
)

@@ -426,3 +408,3 @@ )

parenthesized_list_splat: $ => seq(
parenthesized_list_splat: $ => prec(PREC.parenthesized_list_splat, seq(
'(',

@@ -434,3 +416,3 @@ choice(

')',
),
)),

@@ -441,3 +423,3 @@ argument_list: $ => seq(

choice(
$._expression,
$.expression,
$.list_splat,

@@ -470,3 +452,4 @@ $.dictionary_splat,

alias($._simple_statements, $.block),
seq($._indent, $.block)
seq($._indent, $.block),
alias($._newline, $.block)
),

@@ -479,21 +462,96 @@

variables: $ => seq(
commaSep1($._primary_expression),
expression_list: $ => prec.right(seq(
$.expression,
choice(
',',
seq(
repeat1(seq(
',',
$.expression
)),
optional(',')
),
)
)),
dotted_name: $ => sep1($.identifier, '.'),
// Patterns
_parameters: $ => seq(
commaSep1($.parameter),
optional(',')
),
expression_list: $ => prec.right(seq(
commaSep1($._expression),
_patterns: $ => seq(
commaSep1($.pattern),
optional(',')
),
parameter: $ => choice(
$.identifier,
$.keyword_identifier,
$.typed_parameter,
$.default_parameter,
$.typed_default_parameter,
$.list_splat_pattern,
$.tuple_pattern,
alias('*', $.list_splat_pattern),
$.dictionary_splat_pattern
),
pattern: $ => choice(
$.identifier,
$.keyword_identifier,
$.subscript,
$.attribute,
$.list_splat_pattern,
$.tuple_pattern,
$.list_pattern
),
tuple_pattern: $ => seq(
'(',
optional($._patterns),
')'
),
list_pattern: $ => seq(
'[',
optional($._patterns),
']'
),
default_parameter: $ => seq(
field('name', choice($.identifier, $.keyword_identifier)),
'=',
field('value', $.expression)
),
typed_default_parameter: $ => prec(PREC.typed_parameter, seq(
field('name', choice($.identifier, $.keyword_identifier)),
':',
field('type', $.type),
'=',
field('value', $.expression)
)),
dotted_name: $ => sep1($.identifier, '.'),
list_splat_pattern: $ => seq(
'*',
choice($.identifier, $.keyword_identifier, $.subscript, $.attribute)
),
dictionary_splat_pattern: $ => seq(
'**',
choice($.identifier, $.keyword_identifier, $.subscript, $.attribute)
),
// Expressions
_expression_within_for_in_clause: $ => choice(
$._expression,
$.expression,
alias($.lambda_within_for_in_clause, $.lambda)
),
_expression: $ => choice(
expression: $ => choice(
$.comparison_operator,

@@ -504,3 +562,3 @@ $.not_operator,

$.lambda,
$._primary_expression,
$.primary_expression,
$.conditional_expression,

@@ -510,3 +568,3 @@ $.named_expression

_primary_expression: $ => choice(
primary_expression: $ => choice(
$.binary_operator,

@@ -540,3 +598,3 @@ $.identifier,

'not',
field('argument', $._expression)
field('argument', $.expression)
)),

@@ -546,10 +604,10 @@

prec.left(PREC.and, seq(
field('left', $._expression),
field('left', $.expression),
field('operator', 'and'),
field('right', $._expression)
field('right', $.expression)
)),
prec.left(PREC.or, seq(
field('left', $._expression),
field('left', $.expression),
field('operator', 'or'),
field('right', $._expression)
field('right', $.expression)
))

@@ -576,5 +634,5 @@ ),

return choice(...table.map(([fn, operator, precedence]) => fn(precedence, seq(
field('left', $._primary_expression),
field('left', $.primary_expression),
field('operator', operator),
field('right', $._primary_expression)
field('right', $.primary_expression)
))));

@@ -585,7 +643,7 @@ },

field('operator', choice('+', '-', '~')),
field('argument', $._primary_expression)
field('argument', $.primary_expression)
)),
comparison_operator: $ => prec.left(PREC.compare, seq(
$._primary_expression,
$.primary_expression,
repeat1(seq(

@@ -605,3 +663,3 @@ choice(

),
$._primary_expression
$.primary_expression
))

@@ -614,3 +672,3 @@ )),

':',
field('body', $._expression)
field('body', $.expression)
)),

@@ -626,3 +684,3 @@

assignment: $ => seq(
field('left', $.expression_list),
field('left', $._left_hand_side),
choice(

@@ -636,3 +694,3 @@ seq('=', field('right', $._right_hand_side)),

augmented_assignment: $ => seq(
field('left', $.expression_list),
field('left', $._left_hand_side),
field('operator', choice(

@@ -645,3 +703,23 @@ '+=', '-=', '*=', '/=', '@=', '//=', '%=', '**=',

_left_hand_side: $ => choice(
$.pattern,
$.pattern_list
),
pattern_list: $ => seq(
$.pattern,
choice(
',',
seq(
repeat1(seq(
',',
$.pattern
)),
optional(',')
)
)
),
_right_hand_side: $ => choice(
$.expression,
$.expression_list,

@@ -653,3 +731,3 @@ $.assignment,

yield: $ => seq(
yield: $ => prec.right(seq(
'yield',

@@ -659,10 +737,10 @@ choice(

'from',
$._expression
$.expression
),
optional($.expression_list)
optional($._expressions)
)
),
)),
attribute: $ => prec(PREC.call, seq(
field('object', $._primary_expression),
field('object', $.primary_expression),
'.',

@@ -672,15 +750,15 @@ field('attribute', $.identifier)

subscript: $ => seq(
field('value', $._primary_expression),
subscript: $ => prec(PREC.call, seq(
field('value', $.primary_expression),
'[',
field('subscript', commaSep1(choice($._expression, $.slice))),
commaSep1(field('subscript', choice($.expression, $.slice))),
optional(','),
']'
),
)),
slice: $ => seq(
optional($._expression),
optional($.expression),
':',
optional($._expression),
optional(seq(':', optional($._expression)))
optional($.expression),
optional(seq(':', optional($.expression)))
),

@@ -691,3 +769,3 @@

call: $ => prec(PREC.call, seq(
field('function', $._primary_expression),
field('function', $.primary_expression),
field('arguments', choice(

@@ -702,4 +780,4 @@ $.generator_expression,

$.identifier,
$.list_splat,
$.dictionary_splat
$.list_splat_pattern,
$.dictionary_splat_pattern
),

@@ -710,3 +788,3 @@ ':',

type: $ => $._expression,
type: $ => $.expression,

@@ -716,3 +794,3 @@ keyword_argument: $ => seq(

'=',
field('value', $._expression)
field('value', $.expression)
),

@@ -724,20 +802,16 @@

'[',
optional(commaSep1(choice($._expression, $.list_splat))),
optional(','),
optional($._collection_elements),
']'
),
_comprehension_clauses: $ => seq(
$.for_in_clause,
repeat(choice(
$.for_in_clause,
$.if_clause
))
set: $ => seq(
'{',
$._collection_elements,
'}'
),
list_comprehension: $ => seq(
'[',
field('body', $._expression),
$._comprehension_clauses,
']'
tuple: $ => seq(
'(',
optional($._collection_elements),
')'
),

@@ -752,19 +826,19 @@

dictionary_comprehension: $ => seq(
'{',
field('body', $.pair),
$._comprehension_clauses,
'}'
),
pair: $ => seq(
field('key', $._expression),
field('key', $.expression),
':',
field('value', $._expression)
field('value', $.expression)
),
set: $ => seq(
list_comprehension: $ => seq(
'[',
field('body', $.expression),
$._comprehension_clauses,
']'
),
dictionary_comprehension: $ => seq(
'{',
commaSep1(choice($._expression, $.list_splat)),
optional(','),
field('body', $.pair),
$._comprehension_clauses,
'}'

@@ -775,3 +849,3 @@ ),

'{',
field('body', $._expression),
field('body', $.expression),
$._comprehension_clauses,

@@ -781,20 +855,28 @@ '}'

parenthesized_expression: $ => prec(PREC.parenthesized_expression, seq(
generator_expression: $ => seq(
'(',
choice($._expression, $.yield),
field('body', $.expression),
$._comprehension_clauses,
')'
)),
),
tuple: $ => seq(
'(',
optional(commaSep1(choice($._expression, $.yield))),
optional(','),
')'
_comprehension_clauses: $ => seq(
$.for_in_clause,
repeat(choice(
$.for_in_clause,
$.if_clause
))
),
generator_expression: $ => seq(
parenthesized_expression: $ => prec(PREC.parenthesized_expression, seq(
'(',
field('body', $._expression),
$._comprehension_clauses,
choice($.expression, $.yield),
')'
)),
_collection_elements: $ => seq(
commaSep1(choice(
$.expression, $.yield, $.list_splat, $.parenthesized_list_splat
)),
optional(',')
),

@@ -805,3 +887,3 @@

'for',
field('left', $.variables),
field('left', $._left_hand_side),
'in',

@@ -814,11 +896,11 @@ field('right', commaSep1($._expression_within_for_in_clause)),

'if',
$._expression
$.expression
),
conditional_expression: $ => prec.right(PREC.conditional, seq(
$._expression,
$.expression,
'if',
$._expression,
$.expression,
'else',
$._expression
$.expression
)),

@@ -839,3 +921,3 @@

'{',
$._expression,
$.expression,
optional($.type_conversion),

@@ -863,3 +945,3 @@ optional($.format_specifier),

repeat(choice(
/[^{}\n]+/,
token(prec(1, /[^{}\n]+/)),
$.format_expression

@@ -869,3 +951,3 @@ ))

format_expression: $ => seq('{', $._expression, '}'),
format_expression: $ => seq('{', $.expression, '}'),

@@ -923,3 +1005,3 @@ type_conversion: $ => /![a-z]/,

'await',
$._expression
$.expression
)),

@@ -926,0 +1008,0 @@

{
"name": "tree-sitter-python",
"version": "0.16.1",
"version": "0.17.0",
"description": "Python grammar for tree-sitter",

@@ -16,3 +16,3 @@ "main": "index.js",

"devDependencies": {
"tree-sitter-cli": "^0.16.5"
"tree-sitter-cli": "^0.17.0"
},

@@ -19,0 +19,0 @@ "scripts": {

@@ -41,69 +41,63 @@ [

{
"type": "_expression",
"type": "_simple_statement",
"named": true,
"subtypes": [
{
"type": "_primary_expression",
"type": "assert_statement",
"named": true
},
{
"type": "await",
"type": "break_statement",
"named": true
},
{
"type": "boolean_operator",
"type": "continue_statement",
"named": true
},
{
"type": "comparison_operator",
"type": "delete_statement",
"named": true
},
{
"type": "conditional_expression",
"type": "exec_statement",
"named": true
},
{
"type": "lambda",
"type": "expression_statement",
"named": true
},
{
"type": "named_expression",
"type": "future_import_statement",
"named": true
},
{
"type": "not_operator",
"type": "global_statement",
"named": true
}
]
},
{
"type": "_parameter",
"named": true,
"subtypes": [
},
{
"type": "default_parameter",
"type": "import_from_statement",
"named": true
},
{
"type": "dictionary_splat",
"type": "import_statement",
"named": true
},
{
"type": "identifier",
"type": "nonlocal_statement",
"named": true
},
{
"type": "list_splat",
"type": "pass_statement",
"named": true
},
{
"type": "tuple",
"type": "print_statement",
"named": true
},
{
"type": "typed_default_parameter",
"type": "raise_statement",
"named": true
},
{
"type": "typed_parameter",
"type": "return_statement",
"named": true

@@ -114,43 +108,49 @@ }

{
"type": "_primary_expression",
"type": "expression",
"named": true,
"subtypes": [
{
"type": "attribute",
"type": "await",
"named": true
},
{
"type": "binary_operator",
"type": "boolean_operator",
"named": true
},
{
"type": "call",
"type": "comparison_operator",
"named": true
},
{
"type": "concatenated_string",
"type": "conditional_expression",
"named": true
},
{
"type": "dictionary",
"type": "lambda",
"named": true
},
{
"type": "dictionary_comprehension",
"type": "named_expression",
"named": true
},
{
"type": "ellipsis",
"type": "not_operator",
"named": true
},
{
"type": "false",
"type": "primary_expression",
"named": true
},
}
]
},
{
"type": "parameter",
"named": true,
"subtypes": [
{
"type": "float",
"type": "default_parameter",
"named": true
},
{
"type": "generator_expression",
"type": "dictionary_splat_pattern",
"named": true

@@ -163,31 +163,37 @@ },

{
"type": "integer",
"type": "list_splat_pattern",
"named": true
},
{
"type": "list",
"type": "tuple_pattern",
"named": true
},
{
"type": "list_comprehension",
"type": "typed_default_parameter",
"named": true
},
{
"type": "none",
"type": "typed_parameter",
"named": true
},
}
]
},
{
"type": "pattern",
"named": true,
"subtypes": [
{
"type": "parenthesized_expression",
"type": "attribute",
"named": true
},
{
"type": "set",
"type": "identifier",
"named": true
},
{
"type": "set_comprehension",
"type": "list_pattern",
"named": true
},
{
"type": "string",
"type": "list_splat_pattern",
"named": true

@@ -200,12 +206,4 @@ },

{
"type": "true",
"type": "tuple_pattern",
"named": true
},
{
"type": "tuple",
"named": true
},
{
"type": "unary_operator",
"named": true
}

@@ -215,64 +213,96 @@ ]

{
"type": "_simple_statement",
"type": "primary_expression",
"named": true,
"subtypes": [
{
"type": "assert_statement",
"type": "attribute",
"named": true
},
{
"type": "break_statement",
"type": "binary_operator",
"named": true
},
{
"type": "continue_statement",
"type": "call",
"named": true
},
{
"type": "delete_statement",
"type": "concatenated_string",
"named": true
},
{
"type": "exec_statement",
"type": "dictionary",
"named": true
},
{
"type": "expression_statement",
"type": "dictionary_comprehension",
"named": true
},
{
"type": "future_import_statement",
"type": "ellipsis",
"named": true
},
{
"type": "global_statement",
"type": "false",
"named": true
},
{
"type": "import_from_statement",
"type": "float",
"named": true
},
{
"type": "import_statement",
"type": "generator_expression",
"named": true
},
{
"type": "nonlocal_statement",
"type": "identifier",
"named": true
},
{
"type": "pass_statement",
"type": "integer",
"named": true
},
{
"type": "print_statement",
"type": "list",
"named": true
},
{
"type": "raise_statement",
"type": "list_comprehension",
"named": true
},
{
"type": "return_statement",
"type": "none",
"named": true
},
{
"type": "parenthesized_expression",
"named": true
},
{
"type": "set",
"named": true
},
{
"type": "set_comprehension",
"named": true
},
{
"type": "string",
"named": true
},
{
"type": "subscript",
"named": true
},
{
"type": "true",
"named": true
},
{
"type": "tuple",
"named": true
},
{
"type": "unary_operator",
"named": true
}

@@ -316,7 +346,7 @@ ]

{
"type": "_expression",
"type": "dictionary_splat",
"named": true
},
{
"type": "dictionary_splat",
"type": "expression",
"named": true

@@ -348,3 +378,3 @@ },

{
"type": "_expression",
"type": "expression",
"named": true

@@ -364,4 +394,8 @@ }

{
"type": "expression_list",
"type": "pattern",
"named": true
},
{
"type": "pattern_list",
"named": true
}

@@ -383,2 +417,6 @@ ]

{
"type": "expression",
"named": true
},
{
"type": "expression_list",

@@ -424,3 +462,3 @@ "named": true

{
"type": "_primary_expression",
"type": "primary_expression",
"named": true

@@ -441,4 +479,8 @@ }

{
"type": "expression_list",
"type": "pattern",
"named": true
},
{
"type": "pattern_list",
"named": true
}

@@ -518,2 +560,6 @@ ]

{
"type": "expression",
"named": true
},
{
"type": "expression_list",

@@ -539,3 +585,3 @@ "named": true

{
"type": "_expression",
"type": "expression",
"named": true

@@ -555,3 +601,3 @@ }

{
"type": "_primary_expression",
"type": "primary_expression",
"named": true

@@ -624,3 +670,3 @@ }

{
"type": "_primary_expression",
"type": "primary_expression",
"named": true

@@ -660,3 +706,3 @@ }

{
"type": "_expression",
"type": "expression",
"named": true

@@ -685,3 +731,3 @@ }

{
"type": "_expression",
"type": "expression",
"named": true

@@ -721,3 +767,3 @@ }

{
"type": "_primary_expression",
"type": "primary_expression",
"named": true

@@ -738,3 +784,3 @@ }

{
"type": "_expression",
"type": "expression",
"named": true

@@ -790,3 +836,3 @@ }

{
"type": "_primary_expression",
"type": "primary_expression",
"named": true

@@ -821,3 +867,3 @@ }

{
"type": "_expression",
"type": "expression",
"named": true

@@ -908,3 +954,3 @@ }

{
"type": "_expression",
"type": "expression",
"named": true

@@ -925,2 +971,6 @@ }

{
"type": "expression",
"named": true
},
{
"type": "expression_list",

@@ -990,3 +1040,3 @@ "named": true

{
"type": "_expression",
"type": "expression",
"named": true

@@ -998,2 +1048,25 @@ }

{
"type": "dictionary_splat_pattern",
"named": true,
"fields": {},
"children": {
"multiple": false,
"required": true,
"types": [
{
"type": "attribute",
"named": true
},
{
"type": "identifier",
"named": true
},
{
"type": "subscript",
"named": true
}
]
}
},
{
"type": "dotted_name",

@@ -1022,3 +1095,3 @@ "named": true,

{
"type": "_expression",
"type": "expression",
"named": true

@@ -1065,7 +1138,7 @@ }

{
"type": "_expression",
"type": "block",
"named": true
},
{
"type": "block",
"type": "expression",
"named": true

@@ -1096,3 +1169,3 @@ }

{
"type": "_expression",
"type": "expression",
"named": true

@@ -1112,3 +1185,3 @@ }

{
"type": "_expression",
"type": "expression",
"named": true

@@ -1128,11 +1201,11 @@ }

{
"type": "_expression",
"type": "assignment",
"named": true
},
{
"type": "assignment",
"type": "augmented_assignment",
"named": true
},
{
"type": "augmented_assignment",
"type": "expression",
"named": true

@@ -1171,4 +1244,8 @@ },

{
"type": "variables",
"type": "pattern",
"named": true
},
{
"type": "pattern_list",
"named": true
}

@@ -1186,3 +1263,3 @@ ]

{
"type": "_expression",
"type": "expression",
"named": true

@@ -1223,4 +1300,8 @@ }

{
"type": "variables",
"type": "pattern",
"named": true
},
{
"type": "pattern_list",
"named": true
}

@@ -1234,2 +1315,6 @@ ]

{
"type": "expression",
"named": true
},
{
"type": "expression_list",

@@ -1251,3 +1336,3 @@ "named": true

{
"type": "_expression",
"type": "expression",
"named": true

@@ -1348,3 +1433,3 @@ }

{
"type": "_expression",
"type": "expression",
"named": true

@@ -1394,3 +1479,3 @@ }

{
"type": "_expression",
"type": "expression",
"named": true

@@ -1424,3 +1509,3 @@ }

{
"type": "_expression",
"type": "expression",
"named": true

@@ -1520,3 +1605,3 @@ }

{
"type": "_expression",
"type": "expression",
"named": true

@@ -1554,3 +1639,3 @@ },

{
"type": "_expression",
"type": "expression",
"named": true

@@ -1571,3 +1656,3 @@ }

{
"type": "_expression",
"type": "expression",
"named": true

@@ -1598,3 +1683,3 @@ }

{
"type": "_parameter",
"type": "parameter",
"named": true

@@ -1614,3 +1699,3 @@ }

{
"type": "_expression",
"type": "expression",
"named": true

@@ -1621,2 +1706,10 @@ },

"named": true
},
{
"type": "parenthesized_list_splat",
"named": true
},
{
"type": "yield",
"named": true
}

@@ -1635,3 +1728,3 @@ ]

{
"type": "_expression",
"type": "expression",
"named": true

@@ -1658,2 +1751,17 @@ }

{
"type": "list_pattern",
"named": true,
"fields": {},
"children": {
"multiple": true,
"required": false,
"types": [
{
"type": "pattern",
"named": true
}
]
}
},
{
"type": "list_splat",

@@ -1664,7 +1772,30 @@ "named": true,

"multiple": false,
"required": true,
"types": [
{
"type": "expression",
"named": true
}
]
}
},
{
"type": "list_splat_pattern",
"named": true,
"fields": {},
"children": {
"multiple": false,
"required": false,
"types": [
{
"type": "_expression",
"type": "attribute",
"named": true
},
{
"type": "identifier",
"named": true
},
{
"type": "subscript",
"named": true
}

@@ -1712,3 +1843,3 @@ ]

{
"type": "_expression",
"type": "expression",
"named": true

@@ -1744,3 +1875,3 @@ }

{
"type": "_expression",
"type": "expression",
"named": true

@@ -1761,3 +1892,3 @@ }

{
"type": "_expression",
"type": "expression",
"named": true

@@ -1772,3 +1903,3 @@ }

{
"type": "_expression",
"type": "expression",
"named": true

@@ -1789,3 +1920,3 @@ }

{
"type": "_parameter",
"type": "parameter",
"named": true

@@ -1805,3 +1936,3 @@ }

{
"type": "_expression",
"type": "expression",
"named": true

@@ -1825,2 +1956,21 @@ },

{
"type": "parenthesized_list_splat",
"named": true,
"fields": {},
"children": {
"multiple": false,
"required": true,
"types": [
{
"type": "list_splat",
"named": true
},
{
"type": "parenthesized_expression",
"named": true
}
]
}
},
{
"type": "pass_statement",

@@ -1831,2 +1981,17 @@ "named": true,

{
"type": "pattern_list",
"named": true,
"fields": {},
"children": {
"multiple": true,
"required": true,
"types": [
{
"type": "pattern",
"named": true
}
]
}
},
{
"type": "print_statement",

@@ -1840,3 +2005,3 @@ "named": true,

{
"type": "_expression",
"type": "expression",
"named": true

@@ -1867,3 +2032,3 @@ }

{
"type": "_expression",
"type": "expression",
"named": true

@@ -1879,2 +2044,6 @@ }

{
"type": "expression",
"named": true
},
{
"type": "expression_list",

@@ -1914,2 +2083,6 @@ "named": true

{
"type": "expression",
"named": true
},
{
"type": "expression_list",

@@ -1930,3 +2103,3 @@ "named": true

{
"type": "_expression",
"type": "expression",
"named": true

@@ -1937,2 +2110,10 @@ },

"named": true
},
{
"type": "parenthesized_list_splat",
"named": true
},
{
"type": "yield",
"named": true
}

@@ -1951,3 +2132,3 @@ ]

{
"type": "_expression",
"type": "expression",
"named": true

@@ -1982,3 +2163,3 @@ }

{
"type": "_expression",
"type": "expression",
"named": true

@@ -2017,7 +2198,3 @@ }

{
"type": ",",
"named": false
},
{
"type": "_expression",
"type": "expression",
"named": true

@@ -2036,3 +2213,3 @@ },

{
"type": "_primary_expression",
"type": "primary_expression",
"named": true

@@ -2087,6 +2264,14 @@ }

{
"type": "_expression",
"type": "expression",
"named": true
},
{
"type": "list_splat",
"named": true
},
{
"type": "parenthesized_list_splat",
"named": true
},
{
"type": "yield",

@@ -2099,2 +2284,17 @@ "named": true

{
"type": "tuple_pattern",
"named": true,
"fields": {},
"children": {
"multiple": true,
"required": false,
"types": [
{
"type": "pattern",
"named": true
}
]
}
},
{
"type": "type",

@@ -2108,3 +2308,3 @@ "named": true,

{
"type": "_expression",
"type": "expression",
"named": true

@@ -2144,3 +2344,3 @@ }

{
"type": "_expression",
"type": "expression",
"named": true

@@ -2172,3 +2372,3 @@ }

{
"type": "dictionary_splat",
"type": "dictionary_splat_pattern",
"named": true

@@ -2181,3 +2381,3 @@ },

{
"type": "list_splat",
"type": "list_splat_pattern",
"named": true

@@ -2197,3 +2397,3 @@ }

{
"type": "_primary_expression",
"type": "primary_expression",
"named": true

@@ -2224,17 +2424,2 @@ }

{
"type": "variables",
"named": true,
"fields": {},
"children": {
"multiple": true,
"required": true,
"types": [
{
"type": "_primary_expression",
"named": true
}
]
}
},
{
"type": "while_statement",

@@ -2268,3 +2453,3 @@ "named": true,

{
"type": "_expression",
"type": "expression",
"named": true

@@ -2290,3 +2475,3 @@ }

{
"type": "_expression",
"type": "pattern",
"named": true

@@ -2301,3 +2486,3 @@ }

{
"type": "_expression",
"type": "expression",
"named": true

@@ -2344,3 +2529,3 @@ }

{
"type": "_expression",
"type": "expression",
"named": true

@@ -2556,2 +2741,6 @@ },

{
"type": "comment",
"named": true
},
{
"type": "continue",

@@ -2558,0 +2747,0 @@ "named": false

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc