Boo
  1. Boo
  2. BOO-1150

Dot prefix as implicit self (ie. allow OmittedExpression as MemberReferenceExpression target)

    Details

    • Type: New Feature New Feature
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.9
    • Fix Version/s: 0.9.1
    • Component/s: Compiler
    • Labels:
      None
    • Number of attachments :
      0

      Description

      Allow ".Foo" syntax to express "self.Foo" or "$(CurrentType).Foo" (in a static context).

      AST-wise it creates a MemberReferenceExpression (as usual) but with Target an OmittedExpression.
      Moreover allowing shorthand notation this allows "HAML-like notation" in macros and also macros that can change the meaning of such omitted expression(s).

      E.g:

      macro with(replacement):
          for mre in OmittedExpressionFinder(with.Body):
              mre.Target = replacement
          yield
      
      with Context.NameResolutionServices:
          .Resolve(typeRef1)
          .Resolve(typeRef2)
      

        Activity

        Hide
        Rodrigo B. de Oliveira added a comment -

        Resolved in rev. 3248.

        Show
        Rodrigo B. de Oliveira added a comment - Resolved in rev. 3248.

          People

          • Assignee:
            Cedric Vivier
            Reporter:
            Cedric Vivier
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: