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

Aliases not supported in concrete patterns #1966

Open
rodinaarssen opened this issue Jun 7, 2024 · 0 comments
Open

Aliases not supported in concrete patterns #1966

rodinaarssen opened this issue Jun 7, 2024 · 0 comments

Comments

@rodinaarssen
Copy link
Member

Describe the bug

Aliases of syntactic or lexical definitions are not supported in concrete patterns, when used as the type of a pattern and when used the type of a fragment.

To Reproduce

rascal>syntax A = "a";
ok
rascal>alias AA = A;
ok
rascal>parse(#AA, "a")
A: (A) `a`
rascal>(AA)`a`
|prompt:///|(0,7,<1,0>,<1,7>):Undeclared non-terminal: AA in module $GENERATED_PARSER$1080312658
Advice: |https://www.rascal-mpl.org/docs/Rascal/Errors/CompileTimeErrors/UndeclaredNonTerminal|
|prompt:///|(0,7,<1,0>,<1,7>):Undeclared non-terminal: AA in module $GENERATED_PARSER$1080312658
Advice: |https://www.rascal-mpl.org/docs/Rascal/Errors/CompileTimeErrors/UndeclaredNonTerminal|
|prompt:///|(0,7,<1,0>,<1,7>): Parse error in concrete syntax fragment
Advice: |https://www.rascal-mpl.org/docs/Rascal/Errors/CompileTimeErrors/SyntaxError|
ok
rascal>syntax B = A;
ok
rascal>if ((B)`<AA _>` := (B)`a`) println("hi");
|prompt:///|(5,11,<1,5>,<1,6>):parse error in concrete syntax: |prompt:///|(5,11,<1,5>,<1,6>)
|prompt:///|(5,11,<1,5>,<1,6>):parse error in concrete syntax: |prompt:///|(5,11,<1,5>,<1,6>)
|prompt:///|(4,11,<1,4>,<1,15>): Parse error in concrete syntax fragment
Advice: |https://www.rascal-mpl.org/docs/Rascal/Errors/CompileTimeErrors/SyntaxError|
ok

Desktop (please complete the following information):

  • Context: VS Code plugin
  • Rascal Version: 0.34.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant