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

error when using SynType.CreateApp #179

Open
joprice opened this issue Oct 11, 2024 · 3 comments
Open

error when using SynType.CreateApp #179

joprice opened this issue Oct 11, 2024 · 3 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@joprice
Copy link

joprice commented Oct 11, 2024

SynType.CreateApp throws the error System.Exception: unexpected type: App. This seems to be caused by missing lessRange and greaterRange arguments, which I assume are required when isPostfix is false.

https://github.com/MoiraeSoftware/myriad/blob/3c9818faabf9d508c10c28d5ecd26e66fafb48a1/src/Myriad.Core/AstExtensions.fs#L195-L196

@7sharp9
Copy link
Collaborator

7sharp9 commented Oct 12, 2024

Im guessing its just a case of adding a few range0 where they are expected to be present.

@7sharp9 7sharp9 added help wanted Extra attention is needed good first issue Good for newcomers labels Oct 15, 2024
@joprice
Copy link
Author

joprice commented Oct 29, 2024

Yea adding lessRange = Some range0 and greaterRange = Some range0 works for me. I can do a pr. I didn't at first since I'm relatively new to the lib and AST libs it uses, so I wasn't sure why I was hitting this and whether it would break other people to add them. I thought it might have something to do with shifting AST structures between versions or something along those lines.

@7sharp9
Copy link
Collaborator

7sharp9 commented Oct 30, 2024

Yeah when the AST is updated there's typically something added in so it's just a matter of adding in fake locations for the code start/end elements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants