clipperhouse / typewriter

The package underlying gen: type-driven code generation for Go
http://clipperhouse.github.io/gen/typewriters/#
Other
52 stars 20 forks source link

Allow '.' for typename in annotation comment #8

Closed c9s closed 1 year ago

c9s commented 9 years ago

Summary:

For types from other packages, we need to reference the typename with package name. e.g., "ast.Function"

Related Issue: https://github.com/clipperhouse/gen/issues/88

c9s commented 9 years ago

Use case code:

// +gen symtable:"SymTable[ast.Function]"
type FunctionSymTable map[string]*ast.Function

This fixes the lexer, but we need to let the go/ast works, I am currently tracing the code of type parsing

c9s commented 9 years ago

I will submit the external type support in another PR.

c9s commented 9 years ago

Some updates