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

Vague thoughts about handling the various Syntax:: extension modules #7

Open
leonerd opened this issue Feb 24, 2022 · 0 comments
Open

Comments

@leonerd
Copy link
Owner

leonerd commented Feb 24, 2022

There's many CPAN modules (most of them mine ;) ) that add extra syntax, which currently hugely confuses the parser. A few of these have even been ported to becoming core syntax, enabled with various use feature flags.

It may be worth looking into what extent some features can be made optional somehow. Ideally it'd be great if we could handle all of:

# Future::AsyncAwait
async sub f { await g() }
# Syntax::Keyword::Dynamically
dynamically $x = 123;
# Syntax::Keyword::Try or Feature::Compat::Try or use feature 'try';
try { A() }
catch($e) { B() }
finally { C() }
# Syntax::Keyword::Defer or Feature::Compat::Defer or use feature 'defer';
defer { D() }
# Object::Pad
class Thing v1.23 :isa(OtherThing) {
  has $var :reader :writer :param;
  method m($x) { }
}
# List::Keywords
any { $x > 10 } @numbers;
# Syntax::Keyword::Match
match($var : eq) {
  case("one") { ... }
  case("two") { ... }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant