-
Notifications
You must be signed in to change notification settings - Fork 9
Parser improvements #24
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
Conversation
Signed-off-by: innocentzero <[email protected]>
Signed-off-by: innocentzero <[email protected]>
Signed-off-by: innocentzero <[email protected]>
Signed-off-by: innocentzero <[email protected]>
Signed-off-by: innocentzero <[email protected]>
Signed-off-by: innocentzero <[email protected]>
Both of them are redundant now given that blocks return the type of the last statement Signed-off-by: innocentzero <[email protected]>
Signed-off-by: innocentzero <[email protected]>
Signed-off-by: innocentzero <[email protected]>
Implements OneOf for if-else and def nodes Signed-off-by: innocentzero <[email protected]>
Signed-off-by: innocentzero <[email protected]>
Signed-off-by: innocentzero <[email protected]>
Signed-off-by: innocentzero <[email protected]>
Signed-off-by: innocentzero <[email protected]>
Signed-off-by: innocentzero <[email protected]>
dcc76ff to
2f38bf7
Compare
Signed-off-by: innocentzero <[email protected]>
2f38bf7 to
a921e5a
Compare
Signed-off-by: innocentzero <[email protected]>
a921e5a to
3130dd6
Compare
This is used to indicate the type status in case of an error to avoid ambiguities around the usage of other types Signed-off-by: innocentzero <[email protected]>
|
|
||
| if self.is_operator() { | ||
| // TODO: flag parsing | ||
| self.next(); |
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.
Maybe throw an error here with a WIP note instead of silently ignoring flags.
|
Haven't checked it too thoroughly, but also seems good. Flags with aliases we can add once we have proper signatures etc. |
Since params are not supposed to be evaluated, their type is changed to Forbidden Signed-off-by: innocentzero <[email protected]>
Match not returning anything should be a nothing type as it is an expression. The type for a for loop is now None, which matches the current nushell implementation. Signed-off-by: innocentzero <[email protected]>
|
I was going to add flags next, but it seems to be involved deeply with the parser and since you're rewriting the lexer which will move parts of the parser, I'll wait for it to settle a little bit. For now, I'll rebase once #19 is accepted and add the error for flags. |
Signed-off-by: innocentzero <[email protected]>
Signed-off-by: innocentzero <[email protected]>
Signed-off-by: innocentzero <[email protected]>
Define an alias node to parse, resolve and typecheck aliases Signed-off-by: innocentzero <[email protected]>
Signed-off-by: innocentzero <[email protected]>
3130dd6 to
fdb4f25
Compare
|
I'm closing this in favour of #29 This one became a mess after my previous PR was merged and I wasn't able to resolve it easily. |
Supersedes #24 as it had too many merge conflicts with main. --------- Signed-off-by: innocentzero <[email protected]>
()) properly nowDepends on #19 so that needs to get merged first.