Package jminusminus

Class AmbiguousName

java.lang.Object
jminusminus.AmbiguousName

class AmbiguousName extends Object
This class is used to encapsulate ambiguous names that the parser can't distinguish and disambiguate them during the analysis phase. Ambiguous names are meant to deal with snippets like x.y.z and x.y.z().
  • Constructor Details

    • AmbiguousName

      public AmbiguousName(int line, String name)
      Constructs an encapsulation of the ambiguous portion of a snippet like x.y.z.
      Parameters:
      line - line in which the ambiguous name occurs in the source file.
      name - the ambiguous part, for example x.y in x.y.z.
  • Method Details

    • reclassify

      public JExpression reclassify(Context context)
      Reclassifies the name according to the rules in the Java Language Specification, and returns an AST for it.
      Parameters:
      context - context in which we look up the component names.
      Returns:
      the AST for the reclassified name.
    • toString

      public String toString()
      Returns the ambiguous part.
      Overrides:
      toString in class Object
      Returns:
      the ambiguous part.