-
Notifications
You must be signed in to change notification settings - Fork 30
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
User functions #15
User functions #15
Conversation
…n; Clarify naming for typeString parser;
- Add annotation rules to expr_grammar.pegjs (should probably rename that) - Add multiple starting rules for expr_grammar.pegjs
…hacky 2-stage parsing
- temporarily switch ts-pegjs to my own repo until metadevpro/ts-pegjs#53 gets fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some suggestions. Generally. I think this is a good progress. Let's see how far will it go.
…s and user function maps. Refactor `TypeMap` into the new `TypeEnv` througout the code
- attach a map from spec user function definitions to transpiled function definitions in InstrumentationContext - fix some remaining @todos
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. A few code-related tweak suggestions to keep code-base better readable.
This PR aims to add support for user-defined functions in scribble. At the moment only the grammar part is done, along with some refactoring. As it is likely gonna grow large, starting the review now. More specifically this PR:
Cleanup
New code
Annotation
class from annotations.ts into a baseAnnotationMD
and childPropertyMD
andUserDefinedFunctionMd
classes. These hold a parsed definition node, as well as additional metadata needed to provide pretty errors and error line locationsparse.spec.ts
Notes