TextGen - hashmap usage
Hi,
I'm pretty new to MPS and currently playing around with it to explore it's capabilities.
I'm currently trying to write a text generator to create a custom XML file from my DSL. But I encounter some problems with this.
When I try to put elements into a hashmap inside a TextGen component there is no put method. I just can not add elements to my hashmap.
Is this even the recommended way of using a hashmap like construct inside the TextGen components?
I'm pretty new to MPS and currently playing around with it to explore it's capabilities.
I'm currently trying to write a text generator to create a custom XML file from my DSL. But I encounter some problems with this.
When I try to put elements into a hashmap inside a TextGen component there is no put method. I just can not add elements to my hashmap.
TextGen Component
map<string, string> myMap;
myMap = new hashmap<string, string>;
myMap.put("foo", "bar") //put method missing
Is this even the recommended way of using a hashmap like construct inside the TextGen components?
2 comments
Sort by
Date
Votes
The MPS maps use the myMap[key] syntax to read/write values.
Thank you!
Please sign in to leave a comment.