formatting
This commit is contained in:
parent
9c05060820
commit
255b19e51b
|
@ -1909,7 +1909,6 @@ long ExpressionParseInt(struct ParseState *Parser)
|
||||||
ProgramFail(Parser, "expression expected");
|
ProgramFail(Parser, "expression expected");
|
||||||
|
|
||||||
if (Parser->Mode == RunModeRun) {
|
if (Parser->Mode == RunModeRun) {
|
||||||
// if (!IS_NUMERIC_COERCIBLE(Val))
|
|
||||||
if (!IS_NUMERIC_COERCIBLE_PLUS_POINTERS(Val, true))
|
if (!IS_NUMERIC_COERCIBLE_PLUS_POINTERS(Val, true))
|
||||||
ProgramFail(Parser, "integer value expected instead of %t", Val->Typ);
|
ProgramFail(Parser, "integer value expected instead of %t", Val->Typ);
|
||||||
|
|
||||||
|
|
2
heap.c
2
heap.c
|
@ -36,7 +36,7 @@ void HeapInit(Picoc *pc, int StackOrHeapSize)
|
||||||
pc->HeapStackTop = &(pc->HeapMemory)[AlignOffset];
|
pc->HeapStackTop = &(pc->HeapMemory)[AlignOffset];
|
||||||
*(void **)(pc->StackFrame) = NULL;
|
*(void **)(pc->StackFrame) = NULL;
|
||||||
pc->HeapBottom =
|
pc->HeapBottom =
|
||||||
&(pc->HeapMemory)[StackOrHeapSize-sizeof(ALIGN_TYPE)+AlignOffset];
|
&(pc->HeapMemory)[StackOrHeapSize-sizeof(ALIGN_TYPE)+AlignOffset];
|
||||||
pc->FreeListBig = NULL;
|
pc->FreeListBig = NULL;
|
||||||
for (Count = 0; Count < FREELIST_BUCKETS; Count++)
|
for (Count = 0; Count < FREELIST_BUCKETS; Count++)
|
||||||
pc->FreeListBucket[Count] = NULL;
|
pc->FreeListBucket[Count] = NULL;
|
||||||
|
|
6
lex.c
6
lex.c
|
@ -53,7 +53,7 @@ struct ReservedWord {
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ReservedWord ReservedWords[] = {
|
static struct ReservedWord ReservedWords[] = {
|
||||||
/* wrf, when optimizations are set escaping certain chars is required or they disappear */
|
/* wtf, when optimizations are set escaping certain chars is required or they disappear */
|
||||||
{"#define", TokenHashDefine},
|
{"#define", TokenHashDefine},
|
||||||
{"#else", TokenHashElse},
|
{"#else", TokenHashElse},
|
||||||
{"#endif", TokenHashEndif},
|
{"#endif", TokenHashEndif},
|
||||||
|
@ -109,7 +109,7 @@ void LexInit(Picoc *pc)
|
||||||
Count++) {
|
Count++) {
|
||||||
TableSet(pc, &pc->ReservedWordTable,
|
TableSet(pc, &pc->ReservedWordTable,
|
||||||
TableStrRegister(pc, ReservedWords[Count].Word),
|
TableStrRegister(pc, ReservedWords[Count].Word),
|
||||||
(struct Value *)&ReservedWords[Count], NULL, 0, 0);
|
(struct Value*)&ReservedWords[Count], NULL, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
pc->LexValue.Typ = NULL;
|
pc->LexValue.Typ = NULL;
|
||||||
|
@ -140,7 +140,7 @@ enum LexToken LexCheckReservedWord(Picoc *pc, const char *Word)
|
||||||
struct Value *val;
|
struct Value *val;
|
||||||
|
|
||||||
if (TableGet(&pc->ReservedWordTable, Word, &val, NULL, NULL, NULL))
|
if (TableGet(&pc->ReservedWordTable, Word, &val, NULL, NULL, NULL))
|
||||||
return ((struct ReservedWord *)val)->Token;
|
return ((struct ReservedWord*)val)->Token;
|
||||||
else
|
else
|
||||||
return TokenNone;
|
return TokenNone;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue