summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* Add Tracked typeBen Bridle2025-03-03
| | | | The Tracked type allows tagging an arbitrary type with a SourceSpan.
* Remove unneeded feature attribute from libraryBen Bridle2025-03-03
| | | | The extract_if feature has stabilised and no longer requires nightly.
* Update version to 2.0.1v2.0.1Ben Bridle2025-03-01
|
* Fix compilation on rust nightly 1.87.0Ben Bridle2025-03-01
| | | | The API of the extract_if method has changed to also take a range.
* Update version to 2.0.0v2.0.0Ben Bridle2025-02-27
|
* Change namespace delimiter in symbol debug outputBen Bridle2025-02-27
|
* Rewrite tokeniserBen Bridle2025-02-27
| | | | | This commit adds a subtokenise method that creates a child tokeniser over all characters between the start and end marks.
* Correctly record references resolved by each definitionBen Bridle2025-02-13
| | | | | Definitions were incorrectly not having resolved references associated with them.
* Create struct for reporting unused definitionsBen Bridle2025-02-13
|
* Report redefinition errorsBen Bridle2025-02-13
| | | | | Previously, the Resolver::error method was only checking for undefined symbols, and not also checking for redefined symbols.
* Create struct for reporting in detail the symbols in a resolverBen Bridle2025-02-10
| | | | This is used for debugging symbol definition and resolution issues.
* Definitions can only come from the same or a parent namespaceBen Bridle2025-02-10
| | | | | This commit fixes an error where a reference was being resolved by a definition in a child namespace.
* Track related symbols in resolverBen Bridle2025-02-10
| | | | | | | | As well as the already-implemented tracking of the existing definition of redefinitions, the resolver will now also track the definition that resolves each reference, and the references resolved by each definition. Instead of using tuples to hold this information, named wrapper structs have been created for each category.
* Import from the log and ansi crates once in the reports moduleBen Bridle2025-02-10
| | | | This is tidier than duplicate imports in every file of the module.
* Simplify infallible indexing operations in resolverBen Bridle2025-02-10
| | | | | Indexing into a resolver with a pointer from the same resolver should never fail, and if it does we don't want to silently squash the error.
* Move report-printing structs to separate moduleBen Bridle2025-02-10
|
* Add tokeniser method to mark previous char as start of tokenBen Bridle2025-02-10
| | | | | | This enables a parsing technique where characters can be marked as the start of a token after they've been eaten, instead of having to determine ahead of time via defensively peeking.
* Tidy codeBen Bridle2025-02-09
|
* Rename Position type to SourcePositionBen Bridle2025-02-09
| | | | | | This better matches the naming convention of the other source locator types, and better differentiates a SourcePosition from other kinds of position.
* Log when a source file is merged into the resolverBen Bridle2025-02-08
|
* Support namespaces when resolving symbolsBen Bridle2025-02-08
| | | | | | A definition can resolve a reference in the same or a deeper namespace, allowing for proper scoping and shadowing. Multiple definitions in the same namespace cannot share a name.
* Fix displayed path when discovering librariesBen Bridle2025-02-08
| | | | | The path displayed for each discovered library was the path of the parent directory, not the path of the library file.
* Implement basic namespace support for SymbolsBen Bridle2025-02-08
|
* Implement Copy, Clone, Debug for some typesBen Bridle2025-02-08
|
* Display name of symbol instead of full token in error messagesBen Bridle2025-02-08
| | | | | | | | When reporting an undefined symbol, the full token string of the symbol was being displayed. This was fine for Bedrock, which had at most one symbol per token, but for Torque you can have multiple symbols extracted from the same source string. The symbol name is displayed instead.
* Update version to 1.1.0v1.1.0Ben Bridle2025-02-05
|
* Add logging to gather functionsBen Bridle2025-02-05
| | | | | When gathering source files from paths, log each path traversed or parsed.
* Allow loading a source unit from a path with any extensionBen Bridle2025-02-05
| | | | | | | | Previously, the extension of a source file had to match the provided extension. This was unnecessarily limited, and prevented arbitrary text files from being passed as source files. If no extension is provided, any file can be loaded as a source file.
* Implement source unit compilation, symbol resolution, error reportingBen Bridle2025-02-05
| | | | | | | | | | This library can now carry out all stages of assembly from collecting source fragments to resolving symbols to pruning unused libraries to generating a single compiled source file. Pretty-printing of state has also been implemented in this library. The source tree hierarchy, symbol resolution errors, and file read errors can all be printed in a tidy format.
* Implement a generic source code tokeniserBen Bridle2025-02-04
| | | | | | This is a struct that provides various methods for consuming characters from a character stream and for tracking the provenance of each parsed token.
* Rename locator sub-modulesBen Bridle2025-02-04
|
* Update version to 1.0.0v1.0.0Ben Bridle2025-02-02
|
* Initial commitBen Bridle2025-02-02