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
Support position information in FHIRPath expressions #2517
Comments
I did make it work in the MappingLanguage parser (which was based on Superpower). Too bad we cannot use that code anymore. Are we sure we can make this work in sprache? maybe by patching the original code, which we have included anyway? |
After spending some time in there, I do believe that we can. Just wanted to check before I really started into it to ensure I hadn't missed something already. |
I've progressed with this and have something to demonstrate, but not quite to the level of a branch to show. |
…he Expression objects and also handling comments in fhirpath expressions (they are skipped and not retained in the expression AST)
As noted in the PR this is now fully functional and combined with the comments/whitepsace branch code will permit full round tripping with ObjectModel, which can permit some manual tweaks to the Model and then back out to a string again without losing the whitespace/comments |
Is your feature request related to a problem? Please describe.
The FhirPath
Expression
and derived classes have support for location information however this is never populated by the sprache parser.Describe the solution you'd like
During the parsing of a fhirpath expression optionally support the inclusion of the position information for each sub-expression in the AST.
Additional context
I plan to use this information in the fhirpath-lab project through my open source FhirPath Expression validator nuget package.
This will help significantly with error messages and also highlighting expressions in related tooling.
The text was updated successfully, but these errors were encountered: