func NewEmptyStmtListNode(sourcePosInfo attrib) (interfaces.StmtList, error) { stmt := stmt.NewEmptyStmtList() stmt.SetSourceInfo(sourcePosInfo.(token.Pos)) return stmt, nil }
func TestFormIdentifierExtraction(t *testing.T) { exampleEmptyForm := "form TestForm {}" exampleOutputForm := stmt.NewForm(vari.NewVarID("TestForm"), stmt.NewEmptyStmtList()) testStmtParse(t, exampleEmptyForm, exampleOutputForm) }
func NewStmtListNode(stmtElt attrib) (interfaces.StmtList, error) { stmtEltTypeAsserted := stmtElt.(interfaces.Stmt) stmt := stmt.NewEmptyStmtList() stmt.SetSourceInfo(stmtEltTypeAsserted.SourceInfo()) return stmt.AddStmt(stmtEltTypeAsserted), nil }