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

More tokens #19

Merged
merged 7 commits into from
Jun 22, 2024
Merged

More tokens #19

merged 7 commits into from
Jun 22, 2024

Conversation

JakeRoggenbuck
Copy link
Member

@JakeRoggenbuck JakeRoggenbuck commented Jun 22, 2024

fixes #16

Keywords (other than typedef) added from memory
Copy link
Contributor

@adamhutchings adamhutchings left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thought of a couple more missing operators (thank you C, very cool)

@@ -17,6 +17,73 @@ typedef enum {
TT_CBRACKET, // ]
TT_SEMI, // ;
TT_NO_TOKEN, // Not a token

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought of a couple more that need to be added:

TT_XOR, // ^
TT_XOREQ // ^=
TT_POINT, // ->

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just realized -- also TT_LEFTSHIFTEQUALS and TT_RIGHTSHIFTEQUALS for <<= and >>=.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh one more!!! (Hopefully this is the last one) there's also the dot operator ..

TT_GREATEREQ, // >=
TT_LEFTSHIFT, // <<
TT_RIGHTSHIFT, // >>
TT_LNOT, // !
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also this is minor, but tilde is a bitwise NOT, so if we want to have naming consistent we could call them LNOT and BNOT respectively.

Copy link
Contributor

@adamhutchings adamhutchings left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mentioned you were going to add ttype_from_string support for all operators, so I will approve once that is finished

@JakeRoggenbuck
Copy link
Member Author

You mentioned you were going to add ttype_from_string support for all operators, so I will approve once that is finished

Okay, sounds good

@JakeRoggenbuck
Copy link
Member Author

You mentioned you were going to add ttype_from_string support for all operators, so I will approve once that is finished

Okay, sounds good

STREQ has been added for all operators

@JakeRoggenbuck JakeRoggenbuck merged commit 914b11c into jabacat:main Jun 22, 2024
1 check passed
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.

Add all token types
2 participants