Commit Graph

2 Commits

Author SHA1 Message Date
Bob Nystrom
0ea34e00fe feat: implement floating-point number literal parsing and arithmetic operations
Add support for floating-point number literals in the parser by detecting decimal points with trailing digits in `readNumber()`, and switch the compiler's `number()` function from `strtol` to `strtod` for proper double conversion. Update the `num_abs` primitive to use `fabs()` instead of manual negation. Extend test coverage across arithmetic, comparison, equality, modulus, and string conversion tests with floating-point cases, and add a new test for decimal point at end-of-file error detection.
2013-11-10 05:32:57 +00:00
Bob Nystrom
cde3490579 test: add test files for number_abs, string_contains, string_count and fix empty string corner case in string_contains primitive 2013-10-28 13:53:51 +00:00