1.15
This commit is contained in:
parent
c8261b7497
commit
d7bed5e1a8
@ -21,6 +21,7 @@ typedef enum
|
||||
MINC = '+',
|
||||
MDEC = '-',
|
||||
|
||||
PDRAIN = '/', // Haha drain gang
|
||||
PPIPE = '|'
|
||||
} OP;
|
||||
|
||||
@ -34,6 +35,15 @@ static void prefix_operator(Stack *stack, char op)
|
||||
|
||||
switch (op)
|
||||
{
|
||||
case PDRAIN:
|
||||
NAME++;
|
||||
|
||||
stack_push(stack, DATA);
|
||||
|
||||
DATA = 0;
|
||||
|
||||
break;
|
||||
|
||||
case PPIPE:
|
||||
NAME++;
|
||||
|
||||
@ -129,6 +139,9 @@ void execute(Stack *stack, Stack *originstack, char *modname)
|
||||
{
|
||||
prefix_operator(stack, NAME[0]);
|
||||
|
||||
if (NAME[0] == '#' || NAME[0] == '$')
|
||||
NAME++;
|
||||
|
||||
if (NAME[0] == '@')
|
||||
continue;
|
||||
|
||||
@ -388,25 +401,13 @@ void execute(Stack *stack, Stack *originstack, char *modname)
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!strcmp(NAME, "$println")) // arg <string>
|
||||
if (!strcmp(NAME, "println")) // arg <string>
|
||||
{
|
||||
printf("%s\n", ARG);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!strcmp(NAME, "#println")) // arg <string>
|
||||
{
|
||||
printf("%s\n", ARG);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!strcmp(NAME, "$print")) // arg <string>
|
||||
{
|
||||
printf("%s", ARG);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!strcmp(NAME, "#print")) // arg <const>
|
||||
if (!strcmp(NAME, "print")) // arg <string>
|
||||
{
|
||||
printf("%s", ARG);
|
||||
continue;
|
||||
@ -435,7 +436,7 @@ void execute(Stack *stack, Stack *originstack, char *modname)
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!strcmp(NAME, "#exec")) // arg <const>
|
||||
if (!strcmp(NAME, "exec")) // arg <const>
|
||||
{
|
||||
|
||||
if (!strcmp(ARG, modname))
|
||||
@ -471,7 +472,7 @@ void execute(Stack *stack, Stack *originstack, char *modname)
|
||||
|
||||
// Self-modifying
|
||||
|
||||
if (!strcmp(NAME, "#insert")) // arg <const>
|
||||
if (!strcmp(NAME, "insert")) // arg <const>
|
||||
{
|
||||
if (ARG[0] == '#' || ARG[0] == '$')
|
||||
kms(stack, "ATTEMPTED TO INSERT A HASH/STRING-INSTRUCTION");
|
||||
@ -512,7 +513,7 @@ void execute(Stack *stack, Stack *originstack, char *modname)
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!strcmp(NAME, "#expr")) // arg <const>
|
||||
if (!strcmp(NAME, "expr")) // arg <const>
|
||||
{
|
||||
expression(stack, ARG);
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user