-
Notifications
You must be signed in to change notification settings - Fork 327
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
Private foreign function should result in parser error #10137
Comments
Currently we treat the body of any macro as expression context. For |
Implements #5453. Syntax changes: - Eliminate old non-decimal number syntax. - Unspaced application like `f(x)` is now an error. - Applying `:` to a non-QN in statement context is allowed and produces a `TypeAnnotated` (fixes #6152). API changes: - All fixed-content tokens are now distinct types. Error improvements (fixes #5444), especially for: - Out-of-context expressions/statements - Statement syntaxes - Named-app syntax - Unspaced-application errors - Number syntax - Private annotations (fixes #10137) - Parens (fixes #6741) - Type defs (fixes #8633) - Fix some panics caused by invalid expressions, found by parsing non-Enso code. - Reject some operations in pattern context, e.g. `1 + 1 = 2`. - Eliminate `export` with `all` or `hiding` (#10258). Improve Rust parsing performance by 33%; now 20 MB/s on my bench machine: - Stream lexer to parser. - New, faster parser for type defs, statements, numbers. - More efficient tree layout (fixes #5452). Improve backend parsing performance additionally: - Backend now uses optimized parser build (in debug builds, debug-assertions are still enabled). Build improvements: - Fix some redundancy between `sbt` and build script: now only `sbt` compiles JNI and generates parser's Java bindings for backend use. Build script generates Java to a different directory when parser serialization self-test is requested. - Improve `sbt` detection of changed parser; this should reduce the need for clean builds in CI. Testing: - Add binary target for fuzzing with AFL.
Follow-up of #10060
The following snippet:
Should result in parsing error. Currently, the parser returns:
but it should result in an invalid tree. Or even better in
(Private (ForeignFunction ...))
.Failed attempts
Tasks
The text was updated successfully, but these errors were encountered: