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

Add support for floats #67

Merged
merged 6 commits into from
Jan 3, 2024
Merged

Add support for floats #67

merged 6 commits into from
Jan 3, 2024

Conversation

gregorybchris
Copy link
Collaborator

@gregorybchris gregorybchris commented Jan 1, 2024

  • Add FloatLit
  • Update Lexer to support tokenizing numbers with decimal parts
  • Add Float object
  • Update Parser to parse FloatLit into Float
  • Update arithmetic binops to work for both Int and Float
  • Add matching support for Float objects
  • Add serialize/bencode support for Float objects

scrapscript.py Outdated Show resolved Hide resolved
Copy link
Owner

@tekknolagi tekknolagi left a comment

Choose a reason for hiding this comment

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

I think there is more to be worked out for a clean implementation of the math operators

scrapscript.py Show resolved Hide resolved
scrapscript.py Outdated Show resolved Hide resolved
scrapscript.py Outdated Show resolved Hide resolved
scrapscript.py Outdated Show resolved Hide resolved
scrapscript.py Show resolved Hide resolved
scrapscript.py Outdated Show resolved Hide resolved
scrapscript.py Outdated Show resolved Hide resolved
scrapscript.py Outdated Show resolved Hide resolved
Copy link
Owner

@tekknolagi tekknolagi left a comment

Choose a reason for hiding this comment

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

noice

@tekknolagi
Copy link
Owner

please "squash and merge" using github ui

@gregorybchris gregorybchris merged commit 05d2e00 into trunk Jan 3, 2024
7 checks passed
@gregorybchris gregorybchris deleted the chris/floats branch January 3, 2024 02:32
@tekknolagi tekknolagi linked an issue Jan 3, 2024 that may be closed by this pull request
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.

Float literals
2 participants