Avoid guessing JavaScript from shared let and arrow syntax

This commit is contained in:
evgeny committed 2026-11-02 23:07:48 +01:00
1 parent 970cdd5441
commit 6ea6bf20a8
2 files changed
+12 -3

No files matched your search

@@ -29,6 +29,9 @@ private slots:
QTest::newRow("html") << "<!doctype html>\n<html><script>const f = () => 1;</script></html>" << "HTML";
QTest::newRow("html-fragment") << "<div class=\"hello\"><span>Hello</span></div>" << "HTML";
QTest::newRow("html-css") << "<style>.x { color: red; margin: 1px; }</style><p>Hello</p>" << "HTML";
QTest::newRow("html-js") << "<script>document.addEventListener('load', function() {});</script>" << "HTML";
QTest::newRow("html-script-list") << "<script src=\"test.js\"></script>" << "HTML";
QTest::newRow("ambiguous-let-arrow") << "let x = match value { Value::A => true, Value::B => false };" << "";
QTest::newRow("empty") << "" << "";
QTest::newRow("ambiguous") << "int x = 42;" << "";
QTest::newRow("prose") << "Java and Kotlin have class and function declarations; use CSS for color." << "";