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

compiler/parser: implement parser for bakugo's first spec #5

Merged
merged 48 commits into from
Nov 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
436423f
feat(parser): add partial grammar for Source Code Representation
ishwar00 Apr 21, 2023
d0f479f
feat(parser): parse identifiers, integer literals and operators
ishwar00 Apr 21, 2023
a2113a0
chore(parser): remove sanity check for 'package main'
ishwar00 Apr 21, 2023
9c58cc0
feat(parser): parse keywords
ishwar00 Apr 22, 2023
aa6a27f
style(parser): use UpperCamelCase for production names
ishwar00 Apr 22, 2023
062e829
wip(parser): add grammar and tests for Rune Literals
ishwar00 Apr 22, 2023
e3e453a
style(grammar): run pest_fmt
ishwar00 Apr 22, 2023
45a1c67
fix(grammar): correct grammar for rune literals
ishwar00 Apr 29, 2023
2588c56
test(parser): add more tests for rune literals
ishwar00 Apr 30, 2023
bfaf133
fix(grammar): correct Rbrace production
ishwar00 Apr 30, 2023
7e6f832
feat(parser): parse string literals
ishwar00 Apr 30, 2023
2f215e4
feat(parser): add types and declarations
Samyak2 Jun 3, 2023
eff6c8f
Merge remote-tracking branch 'origin/main' into feat/add-parser-for-s…
ishwar00 Jun 21, 2023
cf25411
feat: add grammer exprssions
ishwar00 Jun 21, 2023
505f3e4
feat: add grammer for `Statements`
ishwar00 Jun 21, 2023
04d2533
fix(parser): eliminate left recursion
Samyak2 Jun 25, 2023
bb255f7
fix: main fn
Samyak2 Jun 25, 2023
9d19837
fix(parser): main bin and hide some rules
Samyak2 Jun 25, 2023
5477628
feat: add a basic AST and WIP conversion from parse tree to AST
Samyak2 Jun 25, 2023
6bcf0b8
feat: first working ast - FnDecls!
Samyak2 Jul 15, 2023
eae1297
feat(ast): parse tuples
ishwar00 Jul 22, 2023
5081e4a
feat(ast): parse simple arithmetic expressions and construct AST
ishwar00 Jul 23, 2023
f9683cf
fix(ci): add `clippy` and lints suggestions
ishwar00 Jul 23, 2023
8be3351
wip(ast): parse function calls and add ast node `FunctionCall`
ishwar-zluri Jul 30, 2023
653678f
fix(ast): store args in vec and remove `Comma` as bin op
ishwar00 Aug 5, 2023
b748f5e
feat(ast): parse kind as first argument
ishwar00 Aug 5, 2023
a5996a0
chore: clippy
Samyak2 Aug 19, 2023
1f5e2e5
fix(parser): correctly handle missing semicolons and EOI
Samyak2 Aug 19, 2023
be7cef4
feat(ast): use `miette` and error handling
Samyak2 Sep 17, 2023
d1025a5
test(ast): add snapshot tests and tooling
ishwar00 Sep 24, 2023
5dd125d
chore: clippy
ishwar00 Sep 24, 2023
6def0a1
test: separate parser and ast error examples
Samyak2 Sep 26, 2023
3357bfa
fix(parser): add test for simple return and fix bug
Samyak2 Sep 26, 2023
81d0c1a
chore: clippy
Samyak2 Sep 26, 2023
b3c1ea0
docs: add todo
Samyak2 Sep 30, 2023
4268258
feat(ast): var and const declarations in stmt
Samyak2 Sep 30, 2023
8777e73
test(ast): `var` and `const` declaration
ishwar00 Oct 1, 2023
162c566
feat(ast): type definitions
ishwar00 Oct 1, 2023
bc0647e
feat(ast): add top level decls and a test
Samyak2 Nov 4, 2023
18523c5
feat: simple floating point numbers
Samyak2 Nov 4, 2023
79de21c
chore: pest fmt
Samyak2 Nov 4, 2023
b4a46b4
feat: add tuple expressions
ishwar00 Nov 11, 2023
a5953e6
feat(ast): add `String` and return values
ishwar00 Nov 11, 2023
c381c77
chore: clippy
ishwar00 Nov 12, 2023
02025ad
test: handle naked returns and fixed tests
ishwar00 Nov 12, 2023
8163a1a
feat(ast): add assignments and add `Error` type
ishwar00 Nov 12, 2023
fd1be49
feat: add if-else stmts and fix expr list parsing
Samyak2 Nov 12, 2023
71c57af
feat(parser): remove inc dec stmt
Samyak2 Nov 12, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
370 changes: 352 additions & 18 deletions compiler/Cargo.lock

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions compiler/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
lazy_static = "1.4.0"
miette = { version = "5.10.0", features = ["fancy"] }
pest = { version = "2.0", features = ["pretty-print"] }
pest_derive = "2.0"
thiserror = "1.0.48"

[dev-dependencies]
insta = { version = "1.29.0", features = ["yaml", "glob"] }
Expand Down
Loading