dsl - StringTemplate and Xtext -
in current work, have written code generator using string template without thinking parser ( instantiating template files using direct java object). , code generator generator generates nice java code.
now, have started write parser. b'coz of nice editor features of xtext, thinking write parser in xtext.
my question "is possible use code generator ( written using stringtemplate ) , parse (written in xtext) in same project?
yes that's possible. xtext offers typed ast parsed files , pass them code generator (directly, iff fulfil same contract / interfaces, or indirectly transforming them expected structure). xtext not impose constraints on how want use parsed information.
Comments
Post a Comment