Skip to content

Commit

Permalink
more tests passing
Browse files Browse the repository at this point in the history
  • Loading branch information
ilevyor committed Mar 22, 2024
1 parent 93871f7 commit d71852e
Show file tree
Hide file tree
Showing 58 changed files with 693,557 additions and 679,629 deletions.
2 changes: 1 addition & 1 deletion crates/core/src/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5935,7 +5935,7 @@ fn dont_swallow_rewrites() {
TestArgExpected {
pattern: r#"
|engine marzano(0.1)
|language js
|language js(js_do_not_use)
|js"export default $susan" => `bob\n$susan`
|"#
.trim_margin()
Expand Down
Binary file modified crates/wasm-bindings/wasm_parsers/tree-sitter-javascript.wasm
Binary file not shown.
Binary file modified crates/wasm-bindings/wasm_parsers/tree-sitter-tsx.wasm
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ fn main() {
let mut c_config = cc::Build::new();
c_config.include(&src_dir);
c_config
.flag_if_supported("-Wno-unused-parameter")
.flag_if_supported("-w")
.flag_if_supported("-Wno-unused-but-set-variable")
.flag_if_supported("-Wno-trigraphs");
let parser_path = src_dir.join("parser.c");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ fn main() {
let mut c_config = cc::Build::new();
c_config.include(src_dir);
c_config
.flag_if_supported("-Wno-unused-parameter")
.flag_if_supported("-w")
.flag_if_supported("-Wno-unused-but-set-variable")
.flag_if_supported("-Wno-trigraphs");
let parser_path = src_dir.join("parser.c");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ fn main() {
let mut c_config = cc::Build::new();
c_config.include(src_dir);
c_config
.flag_if_supported("-Wno-unused-parameter")
.flag_if_supported("-w")
.flag_if_supported("-Wno-unused-but-set-variable")
.flag_if_supported("-Wno-trigraphs");
let parser_path = src_dir.join("parser.c");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ fn main() {
let mut c_config = cc::Build::new();
c_config.include(src_dir);
c_config
.flag_if_supported("-Wno-unused-parameter")
.flag_if_supported("-w")
.flag_if_supported("-Wno-unused-but-set-variable")
.flag_if_supported("-Wno-trigraphs");
let parser_path = src_dir.join("parser.c");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ fn main() {
let mut c_config = cc::Build::new();
c_config.include(src_dir);
c_config
.flag_if_supported("-Wno-unused-parameter")
.flag_if_supported("-w")
.flag_if_supported("-Wno-unused-but-set-variable")
.flag_if_supported("-Wno-trigraphs");
let parser_path = src_dir.join("parser.c");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ fn main() {
let mut c_config = cc::Build::new();
c_config.include(src_dir);
c_config
.flag_if_supported("-Wno-unused-parameter")
.flag_if_supported("-w")
.flag_if_supported("-Wno-unused-but-set-variable")
.flag_if_supported("-Wno-trigraphs");
let parser_path = src_dir.join("parser.c");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ fn main() {
let mut c_config = cc::Build::new();
c_config.include(src_dir);
c_config
.flag_if_supported("-Wno-unused-parameter")
.flag_if_supported("-w")
.flag_if_supported("-Wno-unused-but-set-variable")
.flag_if_supported("-Wno-trigraphs");
let parser_path = src_dir.join("parser.c");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,7 @@ module.exports = grammar({
choice(
field('declaration', $.declaration),
seq(
// field(declaration) ?
field('value', $.expression),
field('declaration', $.expression),
$._semicolon,
),
),
Expand Down Expand Up @@ -837,7 +836,7 @@ module.exports = grammar({
),

// Override
_call_signature: $ => field('parameters', $.formal_parameters),
_call_signature: $ => $._formal_parameters,
_formal_parameter: $ => choice($.pattern, $.assignment_pattern),

optional_chain: _ => '?.',
Expand All @@ -847,7 +846,7 @@ module.exports = grammar({
call_expression: $ => choice(
prec('call', seq(
field('function', choice($.expression, $.import)),
field('arguments', choice($._arguments, $.template_string)),
choice($._arguments, field('arguments', $.template_string)),
)),
prec('member', seq(
field('function', $.primary_expression),
Expand Down Expand Up @@ -1295,9 +1294,7 @@ module.exports = grammar({
optional($._initializer),
),

// _formal_parameters?
// updated skip_snippet_compilation_sort
formal_parameters: $ => seq(
_formal_parameters: $ => seq(
field('parenthesis', alias('(', $.l_parenthesis)),
optional(seq(field('parameters',
commaSep1($._formal_parameter),
Expand Down Expand Up @@ -1331,7 +1328,7 @@ module.exports = grammar({
field('async', optional($.async)),
optional(choice('get', 'set', '*')),
field('name', $._property_name),
field('parameters', $.formal_parameters),
$._formal_parameters,
field('body', $.statement_block),
),

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@
"members": [
{
"type": "FIELD",
"name": "value",
"name": "declaration",
"content": {
"type": "SYMBOL",
"name": "expression"
Expand Down Expand Up @@ -3617,12 +3617,8 @@
]
},
"_call_signature": {
"type": "FIELD",
"name": "parameters",
"content": {
"type": "SYMBOL",
"name": "formal_parameters"
}
"type": "SYMBOL",
"name": "_formal_parameters"
},
"_formal_parameter": {
"type": "CHOICE",
Expand Down Expand Up @@ -3672,21 +3668,21 @@
}
},
{
"type": "FIELD",
"name": "arguments",
"content": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_arguments"
},
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_arguments"
},
{
"type": "FIELD",
"name": "arguments",
"content": {
"type": "SYMBOL",
"name": "template_string"
}
]
}
}
]
}
]
}
Expand Down Expand Up @@ -6724,7 +6720,7 @@
}
]
},
"formal_parameters": {
"_formal_parameters": {
"type": "SEQ",
"members": [
{
Expand Down Expand Up @@ -6970,12 +6966,8 @@
}
},
{
"type": "FIELD",
"name": "parameters",
"content": {
"type": "SYMBOL",
"name": "formal_parameters"
}
"type": "SYMBOL",
"name": "_formal_parameters"
},
{
"type": "FIELD",
Expand Down
Loading

0 comments on commit d71852e

Please sign in to comment.