diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2026-01-15 15:47:38 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2026-01-15 15:48:01 +0100 |
| commit | 38e21d3cd9409d583c627fb9bd401db5dcbd6981 (patch) | |
| tree | 9da43b5db9927ec2dfd5c9f0da89c59f045b0adb /include/CompilerKit | |
| parent | 4014ac78f306a235da419b2da5005d08735cb3f3 (diff) | |
feat: implemented `->`, `.`, error handling.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'include/CompilerKit')
| -rw-r--r-- | include/CompilerKit/AST.h | 2 | ||||
| -rw-r--r-- | include/CompilerKit/Utilities/Compiler.h | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/include/CompilerKit/AST.h b/include/CompilerKit/AST.h index f45d6fd..0ee8f9e 100644 --- a/include/CompilerKit/AST.h +++ b/include/CompilerKit/AST.h @@ -38,13 +38,13 @@ enum struct KeywordKind { kKeywordKindNew, kKeywordKindDelete, kKeywordKindAccess, + kKeywordKindAccessChecked, kKeywordKindIf, kKeywordKindElse, kKeywordKindElseIf, kKeywordKindVariableAssign, kKeywordKindVariableDec, kKeywordKindVariableInc, - kKeywordKindConstant, kKeywordKindTypedef, kKeywordKindEndLine, // Optional in Nectar. kKeywordKindSpecifier, diff --git a/include/CompilerKit/Utilities/Compiler.h b/include/CompilerKit/Utilities/Compiler.h index 2efd7a4..6777ca5 100644 --- a/include/CompilerKit/Utilities/Compiler.h +++ b/include/CompilerKit/Utilities/Compiler.h @@ -32,7 +32,7 @@ #define kPrintF kStdOut #define kPrintErr kStdErr -inline static UInt32 kErrorLimit = 10; +inline static UInt32 kErrorLimit = 0; inline static UInt32 kAcceptableErrors = 0; inline static bool kVerbose = false; inline static bool kOutputAsBinary = false; @@ -51,9 +51,8 @@ inline void print_error(STLString reason, STLString file) noexcept { kStdErr << reason << kBlank << std::endl; - if (kAcceptableErrors > kErrorLimit) std::exit(NECTAR_EXEC_ERROR); - ++kAcceptableErrors; + if (kAcceptableErrors > kErrorLimit) std::exit(NECTAR_EXEC_ERROR); } inline void print_warning(STLString reason, STLString file) noexcept { |
