<feed xmlns='http://www.w3.org/2005/Atom'>
<title>tools.nes/lib/xixanta/src/errors.rs, branch main</title>
<subtitle>Tools for NES/Famicom development.
</subtitle>
<id>https://git.mssola.com/nes/tools.nes/atom?h=main</id>
<link rel='self' href='https://git.mssola.com/nes/tools.nes/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/tools.nes/'/>
<updated>2025-01-09T15:30:01Z</updated>
<entry>
<title>Merge all error types into a single one</title>
<updated>2025-01-09T15:30:01Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mikisabate@gmail.com</email>
</author>
<published>2025-01-09T15:26:20Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/tools.nes/commit/?id=92092ccc245269e0c3a864d06f7e382a5bb9d8b0'/>
<id>urn:sha1:92092ccc245269e0c3a864d06f7e382a5bb9d8b0</id>
<content type='text'>
They started with good intentions, but in the end they were all pretty
much alike. Hence, it makes sense to simplify everything and provide a
single struct.

Signed-off-by: Miquel Sabaté Solà &lt;mikisabate@gmail.com&gt;
</content>
</entry>
<entry>
<title>Remove ContextErrorReason as it was unused</title>
<updated>2025-01-09T15:06:34Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mikisabate@gmail.com</email>
</author>
<published>2025-01-09T15:06:34Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/tools.nes/commit/?id=0f6e6d0b2f6887e025a08a862b55288f871e62ca'/>
<id>urn:sha1:0f6e6d0b2f6887e025a08a862b55288f871e62ca</id>
<content type='text'>
Signed-off-by: Miquel Sabaté Solà &lt;mikisabate@gmail.com&gt;
</content>
</entry>
<entry>
<title>Implement the .include statement</title>
<updated>2025-01-09T15:01:39Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mikisabate@gmail.com</email>
</author>
<published>2025-01-08T11:34:47Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/tools.nes/commit/?id=8b1c270910fce13077864bf39d6e88971a6eb062'/>
<id>urn:sha1:8b1c270910fce13077864bf39d6e88971a6eb062</id>
<content type='text'>
This needed some heavy lifting when it comes to how files were located.
This means that statements like .include/.incbin now take into
consideration a new list made out of SourceInfo, which holds enough
information to translate from which file a node comes from. This has
also been added into errors, so they are more informative on what went
wrong.

In order to tests this, besides all the regular unit tests, a new e2e
test has been added.

Signed-off-by: Miquel Sabaté Solà &lt;mikisabate@gmail.com&gt;
</content>
</entry>
<entry>
<title>Fix usage of labels inside of macros</title>
<updated>2024-12-24T14:41:22Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mikisabate@gmail.com</email>
</author>
<published>2024-12-24T14:41:22Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/tools.nes/commit/?id=e611f38c9d056da01b2cc3a532f9013ad1ee567a'/>
<id>urn:sha1:e611f38c9d056da01b2cc3a532f9013ad1ee567a</id>
<content type='text'>
Instead of calling `evaluate_node` for each node on a macro, just call
`Assembler::bundle` for the list of nodes so the context is preserved
and labels and other statements can be catched as usual.

Signed-off-by: Miquel Sabaté Solà &lt;mikisabate@gmail.com&gt;
</content>
</entry>
<entry>
<title>Prevent missplaced start for procs and scopes</title>
<updated>2024-12-23T15:30:38Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mikisabate@gmail.com</email>
</author>
<published>2024-12-23T15:30:38Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/tools.nes/commit/?id=bbf91bf3abaff31231763352af405a2c22061c90'/>
<id>urn:sha1:bbf91bf3abaff31231763352af405a2c22061c90</id>
<content type='text'>
Signed-off-by: Miquel Sabaté Solà &lt;mikisabate@gmail.com&gt;
</content>
</entry>
<entry>
<title>Prevent early .end statements</title>
<updated>2024-12-23T15:05:17Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mikisabate@gmail.com</email>
</author>
<published>2024-12-23T15:05:17Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/tools.nes/commit/?id=2f40bc30185027a125f782e52b65bc65f1c37b9b'/>
<id>urn:sha1:2f40bc30185027a125f782e52b65bc65f1c37b9b</id>
<content type='text'>
Prevent a missmatch on .end{macro,proc,scope}. This was more or less
already covered when there was a bad context_pop call, but it was prone
to errors.

Check this in eval_context as it should've always been done.

Signed-off-by: Miquel Sabaté Solà &lt;mikisabate@gmail.com&gt;
</content>
</entry>
<entry>
<title>Improve the format of error messages</title>
<updated>2024-12-20T12:06:40Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mikisabate@gmail.com</email>
</author>
<published>2024-12-20T12:04:39Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/tools.nes/commit/?id=19e4da9fd654886f1a49dfb3509daa6526401774'/>
<id>urn:sha1:19e4da9fd654886f1a49dfb3509daa6526401774</id>
<content type='text'>
It was weird to show warnings which also showed "Error: " as a message,
and likewise it was weird for errors to display their kind, since users
simply do not care about this kind of information.

Hence, streamline the format to something closer to what it's done by
modern assemblers/compilers.

Signed-off-by: Miquel Sabaté Solà &lt;mikisabate@gmail.com&gt;
</content>
</entry>
<entry>
<title>Prevent addresses which are out of bounds</title>
<updated>2024-12-18T09:25:12Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mikisabate@gmail.com</email>
</author>
<published>2024-12-18T09:25:12Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/tools.nes/commit/?id=03dae41b2ec20905af780bbcf5c033f683f19efb'/>
<id>urn:sha1:03dae41b2ec20905af780bbcf5c033f683f19efb</id>
<content type='text'>
In some bad scenarios addresses might be pointing out of bounds (e.g. a
reference further than 0xFFFF). This has to be avoided and through fuzzy
testing we even got Rust panics for out of bounds u16 arithmetic. Hence,
just go through usize for the actual computation and check with
u16::MAX.

Signed-off-by: Miquel Sabaté Solà &lt;mikisabate@gmail.com&gt;
</content>
</entry>
<entry>
<title>Remove From&lt;std::io::Error&gt; from errors</title>
<updated>2024-12-18T08:23:16Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mikisabate@gmail.com</email>
</author>
<published>2024-12-18T08:23:16Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/tools.nes/commit/?id=49bd7e8e49655da83d64969a54c6281bd6c6d2fe'/>
<id>urn:sha1:49bd7e8e49655da83d64969a54c6281bd6c6d2fe</id>
<content type='text'>
Having a From&lt;std::io::Error&gt; came from a hacky beginning in which
std::io::Error was being abused. Now the error handling is saner, so
there's no more need for that.

Signed-off-by: Miquel Sabaté Solà &lt;mikisabate@gmail.com&gt;
</content>
</entry>
<entry>
<title>Re-work the handling of segments in the assembler</title>
<updated>2024-12-12T06:55:55Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mikisabate@gmail.com</email>
</author>
<published>2024-11-05T12:39:16Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/tools.nes/commit/?id=f0624b8929e6ead3f2d8b1939dc7f094c539bee1'/>
<id>urn:sha1:f0624b8929e6ead3f2d8b1939dc7f094c539bee1</id>
<content type='text'>
There were a lot of assumptions on the assembler that stemmed from a
fundamental missunderstanding from my side on how segments are laid out
on the final file. This commit is the first step to address this.

Signed-off-by: Miquel Sabaté Solà &lt;mikisabate@gmail.com&gt;
</content>
</entry>
</feed>
