tree-sitter-solidity
Advanced tools
Comparing version 1.2.0 to 1.2.1
@@ -27,2 +27,3 @@ // Precedence is used by the parser to determine which rule to apply when there are two rules that can be applied. | ||
NEW: 13, | ||
REVERT: 14, | ||
MEMBER: 1 | ||
@@ -54,8 +55,3 @@ } | ||
// This is to deal with an ambiguity due to different revert styles | ||
[$._call_arguments, $.tuple_expression], | ||
[$._parameter_list, $.fallback_receive_definition], | ||
[$._primary_expression, $.type_cast_expression], | ||
[$.pragma_value, $._solidity], | ||
[$.variable_declaration_tuple, $.tuple_expression], | ||
@@ -326,2 +322,3 @@ | ||
optional('"evmasm"'), | ||
optional($.assembly_flags), | ||
"{", | ||
@@ -332,2 +329,4 @@ repeat($._yul_statement), | ||
assembly_flags: $ => seq("(", commaSep($.string), ")"), | ||
// -- [ Yul ] -- | ||
@@ -487,4 +486,9 @@ _yul_statement: $ => choice( | ||
// -- [ Statements ] -- | ||
_unchecked: $ => "unchecked", | ||
block_statement: $ => seq(optional($._unchecked), '{', repeat($._statement), "}"), | ||
unchecked: $ => "unchecked", | ||
block_statement: $ => seq( | ||
optional($.unchecked), | ||
'{', | ||
repeat($._statement), | ||
"}" | ||
), | ||
variable_declaration_statement: $ => prec(1,seq( | ||
@@ -550,3 +554,3 @@ choice( | ||
revert_statement: $ => prec(1, seq( | ||
revert_statement: $ => prec(PREC.REVERT, seq( | ||
'revert', | ||
@@ -749,3 +753,3 @@ optional(field("error", $._expression)), | ||
// TODO: back this up with official documentation | ||
type_cast_expression: $ => prec.left(seq($.primitive_type, '(', $._expression,')')), | ||
type_cast_expression: $ => prec.left(seq($.primitive_type, $._call_arguments)), | ||
@@ -870,6 +874,6 @@ ternary_expression: $ => prec.left(seq($._expression, "?", $._expression, ':', $._expression)), | ||
call_expression: $ => seq( | ||
call_expression: $ => prec.right(PREC.CALL, seq( | ||
field("function", $._expression), | ||
$._call_arguments | ||
), | ||
)), | ||
@@ -931,4 +935,6 @@ payable_conversion_expression: $ => seq('payable', $._call_arguments), | ||
field("key_type", $._mapping_key), | ||
optional(field('key_identifier', $.identifier)), | ||
'=>', | ||
field("value_type", $.type_name), | ||
optional(field('value_identifier', $.identifier)), | ||
')', | ||
@@ -1017,3 +1023,3 @@ ), | ||
/u[0-9a-fA-F]{4}/, | ||
/u{[0-9a-fA-F]+}/ | ||
/u\{[0-9a-fA-F]+\}/ | ||
) | ||
@@ -1020,0 +1026,0 @@ )), |
{ | ||
"name": "tree-sitter-solidity", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "A tree sitter parser for Solidity", | ||
@@ -12,6 +12,7 @@ "main": "bindings/node", | ||
"dependencies": { | ||
"nan": "^2.15.0" | ||
"nan": "^2.15.0", | ||
"yarn": "^1.22.21" | ||
}, | ||
"devDependencies": { | ||
"tree-sitter-cli": "^0.20.6" | ||
"tree-sitter-cli": "^0.21" | ||
}, | ||
@@ -18,0 +19,0 @@ "tree-sitter": [ |
Sorry, the diff of this file is not supported yet
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 too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
2511627
16054
0
2
17
+ Addedyarn@^1.22.21
+ Addedyarn@1.22.22(transitive)