0

I am trying to create a kind of main container for my DSL, something like:

val mod_a = module ("file1.scala") {
       //the elements defined using the dsl....
}

val mod_b = module("className") {
       // the elements defined using the dsl...
}

val mod_c = ....

I saw this post and actually I was trying in the same way but it's not my case :(. I mean, maybe the parenthesis should be "{}" instead of "()".

Any suggestion how I can do it? Thanks!

Community
  • 1
  • 1
Avah
  • 227
  • 3
  • 13
  • Do you know "package objects"? – michaJlS Jun 02 '16 at 13:42
  • @michaJIS , Yes, but how you mean to use them in my case? I updated a little my question, also! – Avah Jun 02 '16 at 14:15
  • How about [this question](http://stackoverflow.com/questions/3186783/interesting-dsls-implemented-in-scala?rq=1)? – Sergey Jun 02 '16 at 14:51
  • 1
    @Sergey , Thanks for this rich set of references! Actually, I am going through the example in the book of D.Ghosh - still not lucky to understand how I can resolve my case. I am trying to dig in the `scalaTest DSL`, I am hopping to understand its implementation in a reasonable time! – Avah Jun 02 '16 at 15:21

0 Answers0