* Created brsnch
* Created brsnch (removed placeholder)
* Lexer
- Added tab handling for the presence such as spaces would be in.
- Added unit tests for the new tab processing
- Resolved issues where whitepsace was allowed before and or after the
'.' character
- Renamed isSpliter to isSplitter
- Some Code styling
* Check
- Added two new `SymbolType`s for comments
- `SINGLE_LINE_COMMENT` (for `//`) and `MULTI_LINE_COMMENT` (for `/*`)
* Parser
- Added a bogus `parseComment()` which returns nothing, prints out the comment, consumes the `Token` and returns
- `parseStatement()` now supports `parseComment()` whenever a single-line or multi-line comment is detected
* Parser
- Fixed token consumption code in `parseComment()`
* BasicLexer
- Fixed style mishaps
* ArrLexer
- Implemented dummy lexer
* Parser
- Added some comment related functions (for testing)
- Added `pushComment(Token)`, `hasCommentsOnStack() and `getCommentCount()`
- `parseComment()` now pushes the current comment-based `Token` onto the comment-stack
- Added a comment stack
Unit tests
- Added testing for various examples of comment-type `Token`s
* Lexer
- Replaced the characters with Enumerated type
- Working Comment lexing, single and multiline
- Working escape codes for strings
- Working Signage and Size Encoder indicators
- Removed floatMode in favour of float lexing function
- Added doComment for the comment lexing instead of comment mode
- Added doEscapeCode for escape codes in string
Testing
- Added unit tests for comments
- Added unit tests numerical encoders
- Added unit tests numerical encoders
TODO
- ADD unit tests for all valid escape sequences and some invalid
* Lexer
- Removed stringMode in favour of soString
TODO
- Decide on miltiline strings, currently not supported
* Parser
- Test comments which appear at a non-Module but rather statement lavel
* Parser
- Changed to using `BasicLexer` for comment tests now seeing as it is now implemented therein
* Basic
- Added `roll()` and `shourt()` to mark unittests
* Basic
- `shout()` now adds line number to print out
* Lexer rewrite
- flush
- underscores in numbers
- escape codes
- character escapes
- bug fixes
* Basic
- Fixed `shourt(int)`
* Basic
- Remved crashing (on purpose_ unittest
* Resolved bug where isSplitter evaluated to true every time
* Basic
- Removed `goggaWithLineInfo(...)`
* Basic
- Updated `shout()` to remove rolling
- Removed `roll()`
- Added function and module name as well
* Basic
- Documented `shout()`
* Lexer Done and 100% coverage
* LexerSymbols
- Documented
- Formatted
* Lexer (module)
- Added `LS` alias
- Added `isOperator(char c)`, `isSplitter(char c)`, `isNumericalEncoder_Size(char character)`, `isNumericalEncoder_Signage(char character)` and `isValidEscape_String(char character)`
* BasicLexer
- Documented constructor `hasToken()`, `performLex()`, `doIdentOrPath()`, `doChar()`, `doString()`, `doComment()`, `doEscapeCode()`, `doNumber()`, `doEncoder()`, `doFloat()`, `flush()`, `buildAdvance()`, `improvedAdvance()`, `advanceLine()`, `isOperator(char)`, `isSplitter(char)`, `isValidDotPrecede(char character)`, `isNumericalEncoder(char character)`, `isNumericalEncoder_Size(char character)`, `isNumericalEncoder_Signage(char character)` and `isValidEscape_String(char character)`
- Tried reformatting some of `doChar()`, `doString()`, `flush()`, `buildAdvance()`, `improvedAdvance()`, `advanceLine()`, `isOperator(char)`, `isSplitter(char)`
* Basic
- Removed `LS` alias
Lexer
- Made `LS` alias public
* BasicLexer
- Removed methods `isValidEscape_String(char character)`, `isNumericalEncoder_Signage(char character)`, `isNumericalEncoder_Size(char character)`, `isNumericalEncoder(char character)`, `isSplitter(char c)` and ` isOperator(char c)`
Lexer
- Added method `isNumericalEncoder(char character)`
* BasicLexer
- Documented `isValidDotPrecede(char character)`
* Lexer
- Added method `isValidDotPrecede(char character)`
* BasicLexer
- Removed method `isValidDotPrecede(char character)`
* BasicLexer (unittests)
- Documented the unittests
- Fixed formatting
* BasicLexer
- Typo fixes
* BasicLexer (unittests)
- Only compile-in `shourt(...)` when in unittest build mode
* BasicLexer
- Documented `isForward()` and `isBackward()`
- Made `isBackward()` private
---------
Co-authored-by: GMeyer <21568499@sun.ac.za>
Co-authored-by: GMeyer <gustav.meyer1999@gmail.com>
- `dependencyCheck()` no lomger calls the removed `clearFuncDefs()` from the `dependency.core` module
- `dependencyCheck()` now constructs a new `IFuncDefStore` and then passes it into the `DNodeGenerator`
when dependency generation needs to occur
- Constructor now takes in a `IFuncDefStore`
- When we encounter a `Function` we will add it to the store of function definitions
by using the new `IFuncDefStore` (instead of the old `addFunctionDef(TypeChecker, Function)`
- Removed unused method `saveFunctionDefinitionNode(DNode funcDefNode)`
- Removed unused method `retrieveFunctionDefinitionNode(string functionAbsolutePath)`
- Removed the old method `addFunctionDef(TypeChecker tc, Function func)` (as we are now using the `IFuncDefStore`)
- Removed the `clearFuncDefs()` as we are now using the `IFuncDefStore`
- Removed the `grabFunctionDefs()` as we are now using the `IFuncDefStore`
- Removed the `FunctionData[string]` as we are now using the `IFuncDefStore`
DFunctionInnerGenerator
- Constructor now takes in a `IFuncDefStore`
- Pass in ourselves (a `IFuncDefStore`) into the `DFunctionInnerGenerator` when adding a function definition
- Implemented `grabFunctionDef(string name)` from the updated `IFuncDefStore` API
* Compiler
- Re-enabled compilation tests (partially)
* Dependency
- Fixed comment
- Implemented `clearFuncDefs()`
* TypeChecker
- Clear the `FunctionData[string]` table after a batch of typechecking/codegen such that we don't have lingering data from previous compilations which gets reliniearzed resulting in an exception being thrown as it was marked as linearized from its first time from a previous compilation
* Compiler
- Re-enabled unit tests for compilation
- Added TODO relating to adding failing test cases as well
* Compiler
- Added unit test for failing tests
* TypeCheck
- Use a scopre guard to call `clearFuncDefs()` such that it is called even when exceptions are thrown during depgen, typecheck/codegen ensuring we have it cleared for the next run
* Compiler
- Added `gibeFileData(string)` to easily read the source text
- Added all `typecheck` (good and bad) tests
* Pipelines
- Updated name
* Compiler (unittests)
- Re-ordered the test cases
- Commented them out
* Compiler
- Added documentation for `gibFileData(string)`
- Made `gibFileData(string)` private
* Compiler (unit tests)
- Documented unit test
* Compiler
- Cleaned up imports
* Compiler (unit tests)
- Added TODO
- Added spacing
- Lookup the value of `dgen:compiler` from the config and use that as the C compiler
Configuration
- Set default value of `dgen:compiler` to `"clang"`
Commands
- Added a command to specify the C compile to use
- Transfer `-cccompiler`/`-cc` over to a config entry
- Now lookup `dgen:mapper` instead of `emit:mapper`
Configuration
- Now set `dgen:mapper` to `hashmapper` instead of `emit:mapper`
- Added `dgen_preinline_args` and set it to `false`
Commands
- Updated description for `symbol-mapper`/`sm` flag
- The `symbol-mapper`/`sm` flag now affects the `dgen:mapper` entry instead of the `emit:mapper` entry
- Transfer the flag value of `preinlineArguments`/`pia` to the `dgen:preinline_args` entry