It should be possible to place Stratego code next to an editor service, e.g., for context-sensitive code completion or reference resolving. For simplicity, we could just allow SDF, Stratego and editor services to be placed within sugar declarations. To this end, we need to generalize the “extraction.str” strategy to editor services first.

Submitted by Sebastian Erdweg on 19 April 2011 at 08:31

On 19 April 2011 at 08:36 Sebastian Erdweg tagged compiler

On 11 May 2011 at 10:32 Sebastian Erdweg closed this issue.

On 11 May 2011 at 10:32 Sebastian Erdweg commented:

Implemented this for error checking in the standard library: org/sugarj/transformations/EditorServiceExtension
One can now write the following:

public editor services Editor {
  checking
    errors: 
      Element(lname, attrs, content, rname) = 
      [(lname, "element start and end tag need to coincide"),
       (rname, "element start and end tag need to coincide")]
      where <not(equal)> (lname, rname)
}

The implementation can be easily extended to cover other services such as code completion or reference resolving.

Log in to post comments