Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

SimpleAssigns target should be StaticAssignable, not Node #195

Open
Labels
good first issueAn issue that provides a good intro to working with the Myst codebase. Be helpful! semanticsGeneric label for semantics issues. All semantics issues should have this tag. semantics.parserAny issue relating to changing the semantics of parser code.

Description

I'm pretty sure that SimpleAssign is only created when the left-hand side is a StaticAssignable (e.g., Var, Const, or Underscore). If the target is a pattern, then it becomes a MatchAssign, and if it is some method chain (e.g. x.y = 2), then it is converted into a Call to the y= method with x as the receiver.

With that, I think that the target property of SimpleAssign nodes can be restricted from Node to StaticAssignable. That guarantee is helpful when doing semantic analysis (i.e., myst-typecheck :) and avoids the need to downcast it whenever it is referenced.

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueAn issue that provides a good intro to working with the Myst codebase. Be helpful! semanticsGeneric label for semantics issues. All semantics issues should have this tag. semantics.parserAny issue relating to changing the semantics of parser code.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /