From 22b020225ae77ca1cf9f9984817df9b7fd1aaa12 Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Thu, 27 Nov 2025 14:50:07 +0100 Subject: fix: improve parser, compiler and interpreter APIs Pass a language spec as an argument when create a new parser, compiler or interpreter. Also move the REPL code in interpreter package. --- lang/spec.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lang/spec.go') diff --git a/lang/spec.go b/lang/spec.go index 92d90f7..b1b2580 100644 --- a/lang/spec.go +++ b/lang/spec.go @@ -28,7 +28,7 @@ type TokenProp struct { Precedence int // operator precedence } -// Spec represents the token specification for scanning. +// Spec represents the language specification for scanning. type Spec struct { CharProp [ASCIILen]uint // special Character properties End map[string]string // end delimiters, indexed by start -- cgit v1.2.3