From c7239b2906abb48110e3d41a18e94810af8ab915 Mon Sep 17 00:00:00 2001 From: Mitja Felicijan Date: Thu, 22 Jan 2026 01:44:22 +0100 Subject: Add JavaScript grammar --- tests/test.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 tests/test.js (limited to 'tests/test.js') diff --git a/tests/test.js b/tests/test.js new file mode 100644 index 0000000..0bd4dc7 --- /dev/null +++ b/tests/test.js @@ -0,0 +1,23 @@ +function hello() { + console.log("Hello, World!"); +} + +function add(a, b) { + return a + b; +} + +class MyClass { + constructor() { + this.value = 42; + } + + myMethod(x) { + return x + this.value; + } +} + +const obj = { + shortMethod(a) { + return a; + } +}; -- cgit v1.2.3