diff options
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/compiler.go | 1 | ||||
-rw-r--r-- | compiler/compiler_test.go | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/compiler/compiler.go b/compiler/compiler.go index 5d1a1d5..0c89737 100644 --- a/compiler/compiler.go +++ b/compiler/compiler.go @@ -106,6 +106,7 @@ func Compile(lexspec *spec.LexSpec, opts ...CompilerOption) (*spec.CompiledLexSp } return &spec.CompiledLexSpec{ + Name: lexspec.Name, InitialModeID: spec.LexModeIDDefault, ModeNames: modeNames, KindNames: kindNames, diff --git a/compiler/compiler_test.go b/compiler/compiler_test.go index c76bb24..456920f 100644 --- a/compiler/compiler_test.go +++ b/compiler/compiler_test.go @@ -18,6 +18,7 @@ func TestCompile(t *testing.T) { Caption: "allow duplicates names between fragments and non-fragments", Spec: ` { + "name": "test", "entries": [ { "kind": "a2z", @@ -36,6 +37,7 @@ func TestCompile(t *testing.T) { Caption: "don't allow duplicates names in non-fragments", Spec: ` { + "name": "test", "entries": [ { "kind": "a2z", @@ -54,6 +56,7 @@ func TestCompile(t *testing.T) { Caption: "don't allow duplicates names in fragments", Spec: ` { + "name": "test", "entries": [ { "kind": "a2z", |