chore: update tests

pull/643/head
Amaan Qureshi 2024-02-07 11:53:11 +07:00
parent 4337e362f3
commit a8e147cc74
2 changed files with 28 additions and 9 deletions

@ -272,6 +272,8 @@ Regexps
/on\/e/gim;
/on[^/]afe/gim;
/[\]/]/;
/<!--/;
/a///comment;
---
@ -301,7 +303,14 @@ Regexps
(regex_flags)))
(expression_statement
(regex
(regex_pattern))))
(regex_pattern)))
(expression_statement
(regex
(regex_pattern)))
(expression_statement
(regex
(regex_pattern))
(comment)))
============================================
Comments take precedence over regexes

@ -772,6 +772,12 @@ do do; while (a) while (a)
for (a in b) { do ; while (a) break; }
do
if (true)
do {
} while (false);
while (0);
---
(program
@ -805,7 +811,17 @@ for (a in b) { do ; while (a) break; }
body: (empty_statement)
condition: (parenthesized_expression
(identifier)))
(break_statement))))
(break_statement)))
(do_statement
body: (if_statement
condition: (parenthesized_expression
(true))
consequence: (do_statement
body: (statement_block)
condition: (parenthesized_expression
(false))))
condition: (parenthesized_expression
(number))))
============================================
Return statements
@ -1022,7 +1038,6 @@ Comments within expressions
y // comment
* z;
var a = /<!--/;
---
@ -1031,12 +1046,7 @@ var a = /<!--/;
(binary_expression
(identifier)
(comment)
(identifier)))
(variable_declaration
(variable_declarator
(identifier)
(regex
(regex_pattern)))))
(identifier))))
==========================================
HTML Comments