antlr / antlr/stringtemplate4

Named parameters not support on dynamic template invocations.

Open
#102 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
1k
Forks
234
PR merge metrics
No merged PRs in 30d

Description

I'm using stringtemplate 4.0.8.

I'm having a problem passing a named argument to a template which has been looked up in a dictionary. Here is the offending line of code:

```
public ( }; separator=", ">) {
```

With `(field=fields.(it))` passing field names to a template that has been looked up in a dictionary, so that fields can be rendered in different ways in different situations by substituting in different dictionaries.

On the cheat sheet, the documentation for `<(expr)(argument-list)>` says:

> The argument-list is a list of attribute expressions or attribute assignments where each assignment is of the form attribute=expr.

Making it quite clear that `attribute=expr` is allowed. This worked on StringTemplate 3, but does not appear to be working on 4.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.