about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rwxr-xr-xawk/forth/f.awk3
1 files changed, 3 insertions, 0 deletions
diff --git a/awk/forth/f.awk b/awk/forth/f.awk
index cf50dcf..6c18bfc 100755
--- a/awk/forth/f.awk
+++ b/awk/forth/f.awk
@@ -51,6 +51,9 @@ function repl() {
 }
 
 function interpret(line) {
+    # Remove comments from the line
+    gsub(/\(.*\)/, "", line)  # Remove everything from ( to )
+    
     n = split(line, words, /[ \t]+/)
     
     for (i = 1; i <= n; i++) {