Skip to content

Make typeMap/idMap publicly accessible #92

@Happy-Ferret

Description

@Happy-Ferret

Curious.

Any good reason against making typeMap and idMap public, so its contents can be accessed by the consumer?

I've spent the past 6 hours trying to painfully retrieve a Type's index from idMap through reflection, and I'm still not close to a solution.

If it was IdMap instead, one could simply loop over it and retrieve the index like so:

	for i, k := range token.TokMap.IdMap {
		switch k {
		case intLit.Type:
			fmt.Println(i)
		}
	}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions