summaryrefslogtreecommitdiff
path: root/tests/test.js
diff options
context:
space:
mode:
authorMitja Felicijan <mitja.felicijan@gmail.com>2026-01-22 01:44:22 +0100
committerMitja Felicijan <mitja.felicijan@gmail.com>2026-01-22 01:44:22 +0100
commitc7239b2906abb48110e3d41a18e94810af8ab915 (patch)
treea8c9af6694fd429d45fbdd8373d24ff8bf22db2b /tests/test.js
parent3abc76cce48f3ae66e28ec99af648dc5fdf8bf4a (diff)
downloadcrep-c7239b2906abb48110e3d41a18e94810af8ab915.tar.gz
Add JavaScript grammar
Diffstat (limited to 'tests/test.js')
-rw-r--r--tests/test.js23
1 files changed, 23 insertions, 0 deletions
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;
+ }
+};