'in golang target, what is the alternative to parsetreeproperty?
in golang target, what is the alternative to parsetreeproperty or identyhashmap?
I've looked into antlr golang runtime but found nothing related.
thanks.
Solution 1:[1]
By GoLang just use map[antlr.ParserRuleContext]<user_value_type> is fine.
Solution 2:[2]
ANTLR targets always have (usually small) differences. The class ParseTreeProperty is not present in the Go target.
And the class IdentityHashMap is not from the ANTLR API, but is a core Java class. So if something similar is used in the Go target, it will be a Go map/dictionary-like data structure.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | coder vx |
| Solution 2 | Mike Cargal |
