-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
[FEATURE] Add grammar, translations and better parser #43
Comments
Branch issue-43 created! |
After rewriting the |
Currently doing filtering stuff, just to give you an update, |
I will take a look at https://learning-rust.github.io/docs/custom-error-types/ for the error rewrite. |
I have decided not to use the pest provided pairs, but to make my own token struct and convert the pest types. |
When running the parser with the input [
Token {
token_type: Mark(
Assignment,
),
content: "var x=1",
inner: Some(
[
Token {
token_type: Mark(
Variable,
),
content: "var",
inner: None,
position: Position {
line: 1,
colon: 1,
},
},
Token {
token_type: Identifier,
content: "x",
inner: None,
position: Position {
line: 1,
colon: 5,
},
},
Token {
token_type: TypeDefinition(
Integer,
),
content: "1",
inner: Some(
[
Token {
token_type: TypeDefinition(
IntegerSign,
),
content: "",
inner: None,
position: Position {
line: 1,
colon: 7,
},
},
Token {
token_type: TypeDefinition(
Integer,
),
content: "1",
inner: None,
position: Position {
line: 1,
colon: 7,
},
},
],
),
position: Position {
line: 1,
colon: 7,
},
},
],
),
position: Position {
line: 1,
colon: 1,
},
},
] |
This issue is now being used for multiple improvements, such as working on the parser or adding translations. |
I will add a pratt parser and more grammar in the future. |
Describe the solution you'd like
Add pest grammar.
Describe alternatives you've considered
BNF, EBNF or ABNF grammar.
Additional context
Pest needs to be added to the dependency list.
This issue is now being used to track other changes as well.
The text was updated successfully, but these errors were encountered: