summaryrefslogtreecommitdiff
path: root/src/types
Commit message (Collapse)AuthorAge
* Add three-letter aliases for the equal and bitwise-or operationsHEADmainBen Bridle4 days
| | | | | Every other operation has a three-letter name, so this change makes the operation names more consistent.
* Allow one-element lists to be used as integers in expressionsBen Bridle4 days
| | | | | | If an operator requires an integer value but instead receives a list value that contains a single integer, that integer will be extracted and used instead.
* Make debug operator print the full expression stackBen Bridle9 days
| | | | | The <dbg> operator previously only showed the value on the top of the stack, but now it will list every value.
* Add find operator for expressionsBen Bridle9 days
| | | | | The <fnd> operator returns the index of the first element in a list with the given value.
* Add indexing operator for expressionsBen Bridle9 days
| | | | The <nth> operator extracts the nth integer from a list.
* Add debug operator for expressionsBen Bridle9 days
| | | | | | The <dbg> operator will print the value that is currently at the top of the expression stack as an info-level log message, to help with debugging complex expressions.
* Fix panic caused by dividing by zero in an expressionBen Bridle9 days
|
* Implement new intermediate stageBen Bridle10 days
| | | | | | | | Massive improvement. Label references can be used anywhere in the program, with the program being assembled repeatedly until all labels have stabilised. The bytecode stage will just be a tiny stage tacked onto the end, rather than the old bytecode stage that would resolve labels and expressions.
* Rename the <tal> operator to <sum>Ben Bridle10 days
| | | | | This is a more memorable name, and can be implemented for lists in the future as well.
* Implement <abs> operator for expressionsBen Bridle2025-04-27
| | | | The <abs> operator returns the absolute value of an integer.
* Implement <tal> operator for expressionsBen Bridle2025-04-26
| | | | | | The <tal> operator returns the number of set bits in the binary representation of an integer. For negative numbers, only a single sign bit is counted in the result.
* Implement <len> operator for expressionsBen Bridle2025-04-18
| | | | | The <len> operator returns the width of an integer in bits, using the same calculation as for packing an integer into a bit field.
* Rewrite entire assemblerBen Bridle2025-03-11
The language is now more general, the code is better structured, error reporting is more detailed, and many new language features have been implemented: - conditional blocks - first-class strings - more expression operators - binary literals - negative values - invocations in constant expressions