Skip to content

Add support for named data type parameters - #321

Open
blinkzz wants to merge 1 commit into
AfterShip:masterfrom
blinkzz:master
Open

Add support for named data type parameters#321
blinkzz wants to merge 1 commit into
AfterShip:masterfrom
blinkzz:master

Conversation

@blinkzz

@blinkzz blinkzz commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Added support for named data type parameters (for example Dynamic(max_types = n))
This PR introduces new AST type of TypeWithNamedParams with corresponding visitor, traversal and formatter integration
Most popular use case for this is a standalone columns generated from nested JSON

@git-hulk git-hulk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, one comment to guard the nil pointer.

Comment thread parser/parser_column.go
return false
}
peekToken, err := p.lexer.peekToken()
return err == nil && peekToken.Kind == TokenKindSingleEQ

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also check that peekToken is nil to avoid the panic:

Suggested change
return err == nil && peekToken.Kind == TokenKindSingleEQ
return err == nil && peekToken != nil && peekToken.Kind == TokenKindSingleEQ

@git-hulk

git-hulk commented Sep 9, 2026

Copy link
Copy Markdown
Member

@blinkzz Thanks for your contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants