diff options
author | Ryo Nihei <nihei.dev@gmail.com> | 2022-11-05 14:21:13 +0900 |
---|---|---|
committer | Ryo Nihei <nihei.dev@gmail.com> | 2022-11-05 14:21:13 +0900 |
commit | b24f61a465d21af404ed647a977160042017e601 (patch) | |
tree | 0b695a6775ed6a0a7bb41404b598055855417673 /spec/test/parser.go | |
parent | Update README (diff) | |
download | cotia-b24f61a465d21af404ed647a977160042017e601.tar.gz cotia-b24f61a465d21af404ed647a977160042017e601.tar.xz |
Remove alias system
Remove unimportant features to tidy up the specification.
Diffstat (limited to 'spec/test/parser.go')
-rw-r--r-- | spec/test/parser.go | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/spec/test/parser.go b/spec/test/parser.go index aa5d022..c30d45c 100644 --- a/spec/test/parser.go +++ b/spec/test/parser.go @@ -270,11 +270,7 @@ func formatSyntaxError(synErr *SyntaxError, gram Grammar, lineOffset int) []byte b.WriteString(fmt.Sprintf("'%v' (<invalid>)", string(tok.Lexeme()))) default: if term := gram.Terminal(tok.TerminalID()); term != "" { - if alias := gram.TerminalAlias(tok.TerminalID()); alias != "" { - b.WriteString(fmt.Sprintf("'%v' (%v)", string(tok.Lexeme()), alias)) - } else { - b.WriteString(fmt.Sprintf("'%v' (%v)", string(tok.Lexeme()), term)) - } + b.WriteString(fmt.Sprintf("'%v' (%v)", string(tok.Lexeme()), term)) } else { b.WriteString(fmt.Sprintf("'%v'", string(tok.Lexeme()))) } |