Skip to content

Commit

Permalink
remove debug printlns
Browse files Browse the repository at this point in the history
  • Loading branch information
vetcher committed Jul 26, 2018
1 parent fb185f9 commit 16c2148
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -271,9 +271,7 @@ func parseVariables(decl *ast.GenDecl, file *types.File, opt Option) (vars []typ
if len(spec.Values) > 0 && len(spec.Values) != len(spec.Names) {
return nil, fmt.Errorf("amount of variables and their values not same %d:%d", spec.Pos(), spec.End())
}
fmt.Println(spec)
for i, name := range spec.Names {
fmt.Println(name.Name)
variable := types.Variable{
Base: types.Base{
Name: name.Name,
Expand All @@ -284,7 +282,6 @@ func parseVariables(decl *ast.GenDecl, file *types.File, opt Option) (vars []typ
valType types.Type
err error
)
fmt.Println(i, iotaMark)
if spec.Type != nil {
valType, iotaMark, err = parseByType(spec.Type, file, opt)
if err != nil {
Expand Down Expand Up @@ -313,10 +310,7 @@ var iotaType = types.TName{TypeName: "iota"}
func parseByType(spec interface{}, file *types.File, opt Option) (tt types.Type, im bool, err error) {
switch t := spec.(type) {
case *ast.Ident:
fmt.Println()
fmt.Println("tname:", t.Name)
if t.Name == "iota" {
fmt.Println("success")
return iotaType, true, nil
}
return types.TName{TypeName: t.Name}, false, nil
Expand Down Expand Up @@ -428,7 +422,6 @@ func parseArrayLen(t *ast.ArrayType) int {

// Fill provided types.Type for cases, when variable's value is provided.
func parseByValue(spec interface{}, file *types.File, opt Option) (tt types.Type, iotaMark bool, err error) {
fmt.Printf("%T", spec)
switch t := spec.(type) {
case *ast.BasicLit:
return types.TName{TypeName: t.Kind.String()}, false, nil
Expand Down

0 comments on commit 16c2148

Please sign in to comment.