<feed xmlns='http://www.w3.org/2005/Atom'>
<title>torque-asm, branch v3.0.1</title>
<subtitle>Lightweight meta-assembler</subtitle>
<id>https://code.benbridle.com/torque-asm/atom?h=v3.0.1</id>
<link rel='self' href='https://code.benbridle.com/torque-asm/atom?h=v3.0.1'/>
<link rel='alternate' type='text/html' href='https://code.benbridle.com/torque-asm/'/>
<updated>2025-12-30T01:29:54Z</updated>
<entry>
<title>Update version to 3.0.1</title>
<updated>2025-12-30T01:29:54Z</updated>
<author>
<name>Ben Bridle</name>
<email>ben@derelict.engineering</email>
</author>
<published>2025-12-30T01:29:54Z</published>
<link rel='alternate' type='text/html' href='https://code.benbridle.com/torque-asm/commit/?id=aecc8e439f7360be65d37aa88c0c522434e00881'/>
<id>urn:sha1:aecc8e439f7360be65d37aa88c0c522434e00881</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Defer evaluation of block arguments</title>
<updated>2025-12-30T01:29:19Z</updated>
<author>
<name>Ben Bridle</name>
<email>ben@derelict.engineering</email>
</author>
<published>2025-12-30T00:26:34Z</published>
<link rel='alternate' type='text/html' href='https://code.benbridle.com/torque-asm/commit/?id=a7cfcd4ba9e86dce6d8366dc4122704a49d3909d'/>
<id>urn:sha1:a7cfcd4ba9e86dce6d8366dc4122704a49d3909d</id>
<content type='text'>
When a block value is evaluated, the address tracker is immediately
incremented for each word in the evaluated block. This was causing an
issue when a block value was passed as an argument to a macro
invocation, because argument values would all be evaluated before the
macro body was evaluated. This meant that the value of every label in
the macro body would be pushed forward by the size of the block
argument, even if the block argument is inserted later in the macro.
Furthermore, the address tracker would be incremented exactly once
for each word in the block, even if the block is never inserted into
the macro or is inserted multiple times.

To fix this, we now defer evaluation of a block argument until exactly
when that block argument is inserted into a macro. Because a block
argument could be an invocation with a set of arguments passed to it,
we also store a copy of the current environment alongside the block
value so that it can be evaluated correctly at any time in the future.
</content>
</entry>
<entry>
<title>Move parse_macro_definition_body function closer to calling site</title>
<updated>2025-12-30T01:00:45Z</updated>
<author>
<name>Ben Bridle</name>
<email>ben@derelict.engineering</email>
</author>
<published>2025-12-29T20:09:40Z</published>
<link rel='alternate' type='text/html' href='https://code.benbridle.com/torque-asm/commit/?id=c5e626d27910e82df125d6d0c09037811488eeea'/>
<id>urn:sha1:c5e626d27910e82df125d6d0c09037811488eeea</id>
<content type='text'>
This simplifies the next commit.
</content>
</entry>
<entry>
<title>Improve 'expected block token in macro definition' error message</title>
<updated>2025-12-30T01:00:45Z</updated>
<author>
<name>Ben Bridle</name>
<email>ben@derelict.engineering</email>
</author>
<published>2025-12-30T00:20:26Z</published>
<link rel='alternate' type='text/html' href='https://code.benbridle.com/torque-asm/commit/?id=0de8aef53a2e9e86340bae3d051a1d5d8372ec99'/>
<id>urn:sha1:0de8aef53a2e9e86340bae3d051a1d5d8372ec99</id>
<content type='text'>
When a macro definition body contains more than one token, every token
must be a block token. When a non-block token is included in one of
these macro definitions, an error points to the offending token and
says that a block token was expected in this macro definition.

The change that this commit makes is to also point to the top of the
macro definition to make it clearer that this macro definition is part
of the problem, not just the errant integer or list by itself. Without
this, the error message could be read to say that the integer or list
itself is a macro definition, which could be confusing.
</content>
</entry>
<entry>
<title>Allow macros with different arities to share argument names</title>
<updated>2025-12-04T04:03:55Z</updated>
<author>
<name>Ben Bridle</name>
<email>ben@derelict.engineering</email>
</author>
<published>2025-12-04T03:59:53Z</published>
<link rel='alternate' type='text/html' href='https://code.benbridle.com/torque-asm/commit/?id=29e847768ae5d6fe7e631c668d23536729dbe8d8'/>
<id>urn:sha1:29e847768ae5d6fe7e631c668d23536729dbe8d8</id>
<content type='text'>
This commit includes the arity of a parent macro in the namespace
of a macro argument, so that the assembler library can recognise that
two macro implementations with different arities are not the same.

This fixes an error where two implementations of a macro with the same
name but different arity could not share argument names, because the
arity of the parent macro wasn't being taken into account when checking
for redefinitions.
</content>
</entry>
<entry>
<title>Convert single-element lists to integers when an integer is required</title>
<updated>2025-12-04T03:51:03Z</updated>
<author>
<name>Ben Bridle</name>
<email>ben@derelict.engineering</email>
</author>
<published>2025-12-04T03:51:03Z</published>
<link rel='alternate' type='text/html' href='https://code.benbridle.com/torque-asm/commit/?id=938b40dd15f1d44f8881261a64e092fc0fd9165b'/>
<id>urn:sha1:938b40dd15f1d44f8881261a64e092fc0fd9165b</id>
<content type='text'>
This allows an integer invocation with arguments to be wrapped in `[]`
square brackets so that it can be passed to another invocation as an
argument.
</content>
</entry>
<entry>
<title>Use invocation source for integer type error, not macro source</title>
<updated>2025-11-26T06:24:14Z</updated>
<author>
<name>Ben Bridle</name>
<email>bridle.benjamin@gmail.com</email>
</author>
<published>2025-11-26T06:24:14Z</published>
<link rel='alternate' type='text/html' href='https://code.benbridle.com/torque-asm/commit/?id=091938b459e9f6e7a9ed4e5427da535d0cb693f3'/>
<id>urn:sha1:091938b459e9f6e7a9ed4e5427da535d0cb693f3</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Remove semantic::ListLiteral::Invocation</title>
<updated>2025-11-26T06:22:13Z</updated>
<author>
<name>Ben Bridle</name>
<email>bridle.benjamin@gmail.com</email>
</author>
<published>2025-11-26T06:13:45Z</published>
<link rel='alternate' type='text/html' href='https://code.benbridle.com/torque-asm/commit/?id=80ea0d650e3d8f56e43df21f1293b4ddccb89203'/>
<id>urn:sha1:80ea0d650e3d8f56e43df21f1293b4ddccb89203</id>
<content type='text'>
This variant was never needed or constructed, I would have added it to
match the invocation variants of the block and integer tokens (which do
have a use).
</content>
</entry>
<entry>
<title>Allow quote characters to be used in identifiers</title>
<updated>2025-10-26T20:59:49Z</updated>
<author>
<name>Ben Bridle</name>
<email>bridle.benjamin@gmail.com</email>
</author>
<published>2025-10-26T03:53:46Z</published>
<link rel='alternate' type='text/html' href='https://code.benbridle.com/torque-asm/commit/?id=20a029a3215d1e9816812c3484f65164b8faa613'/>
<id>urn:sha1:20a029a3215d1e9816812c3484f65164b8faa613</id>
<content type='text'>
The single-quote character is used in register names on some processor
architectures. The double-quote character is also allowed to be used in
identifiers for consistency, it could be confusing otherwise.
</content>
</entry>
<entry>
<title>Add three-letter aliases for the equal and bitwise-or operations</title>
<updated>2025-10-19T22:54:48Z</updated>
<author>
<name>Ben Bridle</name>
<email>ben@derelict.engineering</email>
</author>
<published>2025-10-19T22:54:48Z</published>
<link rel='alternate' type='text/html' href='https://code.benbridle.com/torque-asm/commit/?id=120b6f7043937cb1b72f2d52f6cb97fb5d0e3fc6'/>
<id>urn:sha1:120b6f7043937cb1b72f2d52f6cb97fb5d0e3fc6</id>
<content type='text'>
Every other operation has a three-letter name, so this change makes
the operation names more consistent.
</content>
</entry>
</feed>
