Fixed some egregious bugs
git-svn-id: http://picoc.googlecode.com/svn/trunk@72 21eae674-98b7-11dd-bd71-f92a316d2d60
This commit is contained in:
parent
2b1983b668
commit
e348021c51
4
parse.c
4
parse.c
|
@ -138,9 +138,9 @@ int ParseValue(struct ParseState *Parser, struct Value **Result, int ResultOnHea
|
||||||
ProgramFail(Parser, "can't get the address of this");
|
ProgramFail(Parser, "can't get the address of this");
|
||||||
|
|
||||||
VariableStackPop(Parser, *Result);
|
VariableStackPop(Parser, *Result);
|
||||||
*Result = VariableAllocValueFromType(Parser, Typ, TypeGetMatching(Parser, *Result, TypePointer, 0, StrEmpty));
|
*Result = VariableAllocValueFromType(Parser, TypeGetMatching(Parser, (*Result)->Typ, TypePointer, 0, StrEmpty), ResultOnHeap);
|
||||||
(*Result)->Val->Pointer.Segment = LocalLValue;
|
(*Result)->Val->Pointer.Segment = LocalLValue;
|
||||||
(*Result)->Val->Pointer.Offset = 0;
|
(*Result)->Val->Pointer.Data.Offset = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TokenIdentifier:
|
case TokenIdentifier:
|
||||||
|
|
1
picoc.h
1
picoc.h
|
@ -231,6 +231,7 @@ void Parse(const char *FileName, const char *Source, int SourceLen, int RunIt);
|
||||||
void TypeInit();
|
void TypeInit();
|
||||||
int TypeSizeof(struct ValueType *Typ);
|
int TypeSizeof(struct ValueType *Typ);
|
||||||
void TypeParse(struct ParseState *Parser, struct ValueType **Typ, const char **Identifier);
|
void TypeParse(struct ParseState *Parser, struct ValueType **Typ, const char **Identifier);
|
||||||
|
struct ValueType *TypeGetMatching(struct ParseState *Parser, struct ValueType *ParentType, enum BaseType Base, int ArraySize, const char *Identifier);
|
||||||
|
|
||||||
/* intrinsic.c */
|
/* intrinsic.c */
|
||||||
void IntrinsicInit(struct Table *GlobalTable);
|
void IntrinsicInit(struct Table *GlobalTable);
|
||||||
|
|
Loading…
Reference in a new issue