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

chore: Standardized Exit Codes; Added Token Kinds #15

Merged
merged 4 commits into from
Jul 20, 2024
Merged

chore: Standardized Exit Codes; Added Token Kinds #15

merged 4 commits into from
Jul 20, 2024

Conversation

kul-sudo
Copy link
Contributor

No description provided.

@kul-sudo kul-sudo changed the base branch from main to rewrite July 20, 2024 00:24
@slbsh slbsh changed the title Improvements chore: Standardized Exit Codes; Added Token Kinds Jul 20, 2024
@slbsh slbsh merged commit 5ee6513 into shard-org:rewrite Jul 20, 2024
0 of 2 checks passed
HavenSelph added a commit that referenced this pull request Jul 25, 2024
* initial commit

* added scanner.rs

Co-authored-by: Haven Selph <[email protected]>

* updated `README.md`

* added code style reference

* added code style reference

* specified what is an index for spans

* change: use let pattern instead of unwrap

* feat: coloured error logging

* fix: removed an unused mut

* added span printer

* added shorthand and changed error note

* removed wildcard import

* fix: scanner didn't use span without line_index

* feat: Coloured context error highlighting

* chore: Standardized Exit Codes; Added Token Kinds (#15)

* general improvements

* remove unneeded tokens

* fix errors

---------

Co-authored-by: slbsh <[email protected]>

* chore: move exit logic to error.rs

* Add lifetimes to style guide

* feat: lexer, better errors, better arg parser

- yeah I made a lexer
- errors are no longer fucked
- arg parser expects one use of arguments
- added output file

* update args

* start parser

* start expr parser

* some atomic expr parsing

+ identifier parsing
+ int/float literal parsing
- unify `DecimalIntLiteral`, etc. into `IntLiteral`

* fix: separate-base integer parsing

* simplify how the parser handles int literals

- instead of having separate match cases, we funnel them into one and match the kind to a base. the string parsing function then just uses that base value instead of a hardcoded one

* int literals store usize

* fix: lexer can't deal with comments

* fix: debug flag sets false

+ also added token printing when in debug

* feat: parser rewrite

Should work if someone can fix the mut reference issues, one fix would be to change current to a reference on the struct possibly, maybe I'm missing something though. Good luck.

* still implementing the parser

- it does not work, need to deal with span issues

* change: renamed error to report

- this is how it should have been -_-
+ added unwrap functions that create our report type

* broken at empty file with more than one line

* Added a shard test file

* Added rustfmt.toml

* feat: string lexing

* fix: overflow bug, span display, trailing newlines

* fmt: run rustfmt with new config

* feat: verbs. skill issue haven :>

* change: cleaned up arg parser api and defaults

* rm: unused dependency; change: ignore Cargo.lock

* chane: spelling

* fmt: add spaces

* fmt/fix: minor fixes

* chore: add commit style reference

* fix: infinite loop in parser

* chore: cleanup match destructuring

* chore: fix formatting in REFERENCE.md

* feat: lexing character literals

* fix: removed debug print

* chore: added help msg on missing char error

* chore: double versions of logical tokens

---------

Co-authored-by: Haven Selph <[email protected]>
Co-authored-by: Kul <[email protected]>
Co-authored-by: spsandwichman <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants