mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 14:54:07 +10:00
Comment tweaks
This commit is contained in:
@@ -13,6 +13,7 @@ DONE: truthiness rethink
|
|||||||
DONE: string concat with the + operator
|
DONE: string concat with the + operator
|
||||||
DONE: increment & decrement operators
|
DONE: increment & decrement operators
|
||||||
|
|
||||||
|
TODO: A way to check the type of a variable (typeOf keyword)
|
||||||
TODO: a = b = c = 1; ?
|
TODO: a = b = c = 1; ?
|
||||||
TODO: are compounds shallow or deep copies?
|
TODO: are compounds shallow or deep copies?
|
||||||
TODO: functions, and all of their features
|
TODO: functions, and all of their features
|
||||||
|
|||||||
@@ -189,7 +189,6 @@ static void writeCompilerWithJumps(Compiler* compiler, Node* node, void* breakAd
|
|||||||
|
|
||||||
//determine node type
|
//determine node type
|
||||||
switch(node->type) {
|
switch(node->type) {
|
||||||
//TODO: more types, like variables, etc.
|
|
||||||
case NODE_ERROR: {
|
case NODE_ERROR: {
|
||||||
fprintf(stderr, ERROR "[Internal] NODE_ERROR encountered in writeCompilerWithJumps()\n" RESET);
|
fprintf(stderr, ERROR "[Internal] NODE_ERROR encountered in writeCompilerWithJumps()\n" RESET);
|
||||||
compiler->bytecode[compiler->count++] = OP_EOF; //1 byte
|
compiler->bytecode[compiler->count++] = OP_EOF; //1 byte
|
||||||
|
|||||||
@@ -709,7 +709,7 @@ static void execInterpreter(Interpreter* interpreter) {
|
|||||||
interpreter->scope = popScope(interpreter->scope);
|
interpreter->scope = popScope(interpreter->scope);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
//TODO: custom type declarations
|
//TODO: custom type declarations?
|
||||||
|
|
||||||
case OP_VAR_DECL:
|
case OP_VAR_DECL:
|
||||||
case OP_VAR_DECL_LONG:
|
case OP_VAR_DECL_LONG:
|
||||||
|
|||||||
@@ -9,5 +9,4 @@ typedef struct {
|
|||||||
|
|
||||||
extern KeywordType keywordTypes[];
|
extern KeywordType keywordTypes[];
|
||||||
|
|
||||||
//for debugging
|
|
||||||
char* findKeywordByType(TokenType type);
|
char* findKeywordByType(TokenType type);
|
||||||
|
|||||||
@@ -248,7 +248,7 @@ void printLiteralCustom(Literal literal, void (printFn)(const char*)) {
|
|||||||
|
|
||||||
case LITERAL_FUNCTION:
|
case LITERAL_FUNCTION:
|
||||||
printToBuffer("function");
|
printToBuffer("function");
|
||||||
//TODO
|
//TODO: how to print a function
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case LITERAL_IDENTIFIER:
|
case LITERAL_IDENTIFIER:
|
||||||
|
|||||||
Reference in New Issue
Block a user