Debian Codegraph @

example/errorrecovery/ast/ast.go

raw symbols SCIP
1 package ast
2
3 import (
4 "github.com/goccmack/gocc/example/errorrecovery/token"
5 )
6
7 type (
8 StmtList []interface{}
9 Stmt string
10 )
11
12 func NewStmtList(stmt interface{}) (StmtList, error) {
13 return StmtList{stmt}, nil
14 }
15
16 func AppendStmt(stmtList, stmt interface{}) (StmtList, error) {
17 return append(stmtList.(StmtList), stmt), nil
18 }
19
20 func NewStmt(stmtList interface{}) (Stmt, error) {
21 return Stmt(stmtList.(*token.Token).Lit), nil
22 }