Official Tristan Language project compiler https://deavmi.assigned.network/projects/tlang
Go to file
Tristan B. Velloza Kildaire ce995ba5d4 Parser
- Fixed import for `Token` class
- Removed the token management fields such as `tokens`, `currentToken` and `tokenPtr` as these are now replaced by our `LexerInterface`, `lexer` field which manages this all for us
- Removed constructor which accepts a `Token[]`, now onyl accept a `LexerInterface`
- Removed `nextToken()`, `hasTokens()`, `getCurrentToken()`, `previousToken()`, `setCursor(ulong)` and `getCursor()`.
- The above now are called via the `lexer` instance

Parser (unit tests)

- Migrated to new `LexerInterface`+`BasicLexer` system
- Hoisted out common imports for unit tests into a `version(unittest)`

TypeChecker (unittests)

- Hoisted out common imports for unit tests into a `version(unittest)`
- Migrated to new `LexerInterface`+`BasicLexer` system

LexerInterface

- Moved to new `lexer.core` package
- Documented module and class

Commands

- Fixed imports for the (now) `BasicLexer`
- Fixed imports for the (now) `lexer.core` package

Compiler

- Fixed imports for the (now) `BasicLexer`
- Use `LexerInterface` instead of `Lexer`
- The `doLex()` method now uses an instance of `BasicLexer` and then downcasts to quickly call `performLex()` in order to tokenize and make them available
- The `doParse()` method now takes in an instance of `LexerInterface` rather than `Token[]`

BasicLexer (previously Lexer)

- Moved to the `lexer.kinds` package
- Now implements `LexerInterface`
- Documented module and class
- Documented the `LexerInterface` methods

Exceptions

- Moved to the `lexer.core` package
- Fixed import of `Token` class
- Now uses `LexerInterface`

Core.Lexer.Package

- Documented package module

Tokens

- Moved to the `lexer.core` package
- Documented module and class

Check

- Fixed import for `Token`
- Fixed import for `BasicLexer`
2023-07-09 12:35:04 +02:00
.github/workflows 🧠 Feature: Direct function calls (#11) 2023-04-28 11:03:46 +02:00
branding Array support (#1) 2023-04-20 11:21:50 +02:00
rando Fuck this is complicated (2/2) 2021-06-06 22:46:06 +02:00
source/tlang Parser 2023-07-09 12:35:04 +02:00
.gitignore 🧠 Feature: Meta-programming engine (#10) 2023-05-29 17:02:28 +02:00
README.md Update README.md 2023-03-26 14:13:56 +02:00
dub.json DUB configuration 2023-02-05 12:27:14 +02:00
extern_test.sh Check 2023-01-28 18:12:49 +02:00
macro_ast_replacemenet.png 🧠 Feature: Meta-programming engine (#10) 2023-05-29 17:02:28 +02:00
macro_ast_replacemenet.xcf 🧠 Feature: Meta-programming engine (#10) 2023-05-29 17:02:28 +02:00
macro_ast_replacement_sizeof_example.png 🧠 Feature: Meta-programming engine (#10) 2023-05-29 17:02:28 +02:00
macro_ast_replacement_sizeof_example.xcf 🧠 Feature: Meta-programming engine (#10) 2023-05-29 17:02:28 +02:00
malloc_test.sh Pointer support (#2) 2023-04-17 16:50:11 +02:00
tets.d Added testing files 2021-11-02 15:14:03 +02:00
texterned.c - Added `texterned.c` for later extern testing 2023-01-19 17:52:46 +02:00
todo1.md I wonder if that worked 2021-06-07 14:27:36 +02:00
wip.txt Array support (#1) 2023-04-20 11:21:50 +02:00

README.md

tlang

D

Official Tristan Language project compiler

Documentation

Docs are available here.

Building

To build you will need dmd and dub installed. You can then run the following:

dub test --coverage
dub build

The first command is optional but you want to make sure the compiler is working so you may as well run all the unit tests - it won't take too long.

Usage

A list of all commands can be found by typing in the following:

./tlang