Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow in to be Parsed as an Operator #445

Closed
2 tasks
iamrecursion opened this issue Jun 4, 2020 · 1 comment
Closed
2 tasks

Allow in to be Parsed as an Operator #445

iamrecursion opened this issue Jun 4, 2020 · 1 comment
Assignees
Labels
--breaking Important: a change that will break a public API or user-facing behaviour p-highest Should be completed ASAP

Comments

@iamrecursion
Copy link
Contributor

Summary

In Enso's type signature syntax, in behaves more like an operator than a function. However, the parser treats it as a standard variable identifier, which means that it doesn't get interpreted as an operator. This causes problems with how the compiler needs to handle it, as well as problems in how it's parsed relative to other operators (around variable precedence).

Value

The context ascription will be handled properly by the parser.

Specification

  • Add the in context ascription operator as an operator in the parser.
  • Update the parser to support this new syntax.

Acceptance Criteria & Test Cases

  • No parser tests are broken.
  • We can correctly parse in as an operator.
@iamrecursion iamrecursion transferred this issue from another repository Jun 23, 2020
@joenash joenash added Category: Syntax --breaking Important: a change that will break a public API or user-facing behaviour p-highest Should be completed ASAP labels Jun 23, 2020
@iamrecursion iamrecursion mentioned this issue Jun 23, 2020
26 tasks
@iamrecursion
Copy link
Contributor Author

Closed. It is hackily supported in the current parser, and will be supported properly in the new parser.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
--breaking Important: a change that will break a public API or user-facing behaviour p-highest Should be completed ASAP
Projects
None yet
Development

No branches or pull requests

3 participants