(skip-chars-backward " \t\n")
(should (string= (or reference code-string)
(buffer-substring-no-properties
(skip-chars-backward " \t\n")
(should (string= (or reference code-string)
(buffer-substring-no-properties
"Parse CODE-STRING. If SYNTAX-ERROR is nil, print syntax tree
with `js2-print-tree' and assert the result to be equal to
REFERENCE, if present, or the original string. If SYNTAX-ERROR
"Parse CODE-STRING. If SYNTAX-ERROR is nil, print syntax tree
with `js2-print-tree' and assert the result to be equal to
REFERENCE, if present, or the original string. If SYNTAX-ERROR
(js2-test-parse-string ,code-string
:syntax-error ,syntax-error
:errors-count ,errors-count
(js2-test-parse-string ,code-string
:syntax-error ,syntax-error
:errors-count ,errors-count
(js2-deftest-parse destruct-in-arguments
"function f({a: aa, b: bb}) {\n}")
(js2-deftest-parse destruct-in-arguments
"function f({a: aa, b: bb}) {\n}")
"[a + b for ([a, b] in [[0, 1], [1, 2]])];")
(js2-deftest-parse destruct-in-catch-clause
"[a + b for ([a, b] in [[0, 1], [1, 2]])];")
(js2-deftest-parse destruct-in-catch-clause
(js2-deftest-parse destruct-non-name-target-is-error
"var {1=1} = {};" :syntax-error "1" :errors-count 1)
(js2-deftest-parse destruct-non-name-target-is-error
"var {1=1} = {};" :syntax-error "1" :errors-count 1)