mirror of
https://github.com/CPunch/Cosmo.git
synced 2024-11-21 23:10:05 +00:00
minor formatting fixes
This commit is contained in:
parent
b902ac90de
commit
e335fd95d6
@ -9,7 +9,6 @@
|
||||
#include <sys/time.h>
|
||||
|
||||
// ================================================================ [BASELIB]
|
||||
// ================================================================
|
||||
|
||||
int cosmoB_print(CState *state, int nargs, CValue *args)
|
||||
{
|
||||
@ -164,7 +163,6 @@ void cosmoB_loadLibrary(CState *state)
|
||||
}
|
||||
|
||||
// ================================================================ [OBJECT.*]
|
||||
// ================================================================
|
||||
|
||||
int cosmoB_osetProto(CState *state, int nargs, CValue *args)
|
||||
{
|
||||
@ -255,7 +253,6 @@ COSMO_API void cosmoB_loadObjLib(CState *state)
|
||||
}
|
||||
|
||||
// ================================================================ [OS.*]
|
||||
// ================================================================
|
||||
|
||||
// os.read()
|
||||
int cosmoB_osRead(CState *state, int nargs, CValue *args)
|
||||
@ -353,7 +350,6 @@ COSMO_API void cosmoB_loadOSLib(CState *state)
|
||||
}
|
||||
|
||||
// ================================================================ [STRING.*]
|
||||
// ================================================================
|
||||
|
||||
// string.sub
|
||||
int cosmoB_sSub(CState *state, int nargs, CValue *args)
|
||||
@ -629,7 +625,6 @@ void cosmoB_loadStrLib(CState *state)
|
||||
}
|
||||
|
||||
// ================================================================ [MATH]
|
||||
// ================================================================
|
||||
|
||||
// math.abs
|
||||
int cosmoB_mAbs(CState *state, int nargs, CValue *args)
|
||||
@ -847,7 +842,6 @@ void cosmoB_loadMathLib(CState *state)
|
||||
}
|
||||
|
||||
// ================================================================ [VM.*]
|
||||
// ================================================================
|
||||
|
||||
// vm.__getter["globals"]
|
||||
int cosmoB_vgetGlobal(CState *state, int nargs, CValue *args)
|
||||
|
@ -56,7 +56,6 @@ int addConstant(CState *state, CChunk *chunk, CValue value)
|
||||
}
|
||||
|
||||
// ================================================================ [WRITE TO CHUNK]
|
||||
// ================================================================
|
||||
|
||||
void writeu8Chunk(CState *state, CChunk *chunk, INSTRUCTION i, int line)
|
||||
{
|
||||
@ -71,8 +70,8 @@ void writeu8Chunk(CState *state, CChunk *chunk, INSTRUCTION i, int line)
|
||||
|
||||
void writeu16Chunk(CState *state, CChunk *chunk, uint16_t i, int line)
|
||||
{
|
||||
static const int sz = sizeof(uint16_t) / sizeof(INSTRUCTION);
|
||||
INSTRUCTION *buffer = (INSTRUCTION *)(&i);
|
||||
int sz = sizeof(uint16_t) / sizeof(INSTRUCTION);
|
||||
|
||||
for (int i = 0; i < sz; i++) {
|
||||
writeu8Chunk(state, chunk, buffer[i], line);
|
||||
|
@ -108,7 +108,6 @@ static ParseRule *getRule(CTokenType type);
|
||||
static CObjFunction *endCompiler(CParseState *pstate);
|
||||
|
||||
// ================================================================ [FRONT END/TALK TO LEXER]
|
||||
// ================================================================
|
||||
|
||||
static void initCompilerState(CParseState *pstate, CCompilerState *ccstate, FunctionType type,
|
||||
CCompilerState *enclosing)
|
||||
@ -269,7 +268,6 @@ static bool blockFollow(CToken token)
|
||||
}
|
||||
|
||||
// ================================================================ [WRITE TO CHUNK]
|
||||
// ================================================================
|
||||
|
||||
CChunk *getChunk(CParseState *pstate)
|
||||
{
|
||||
@ -460,7 +458,6 @@ static bool isLast(CParseState *pstate, Precedence pType)
|
||||
}
|
||||
|
||||
// ================================================================ [PARSER]
|
||||
// ================================================================
|
||||
|
||||
static void number(CParseState *pstate, bool canAssign, Precedence prec)
|
||||
{
|
||||
|
@ -59,8 +59,7 @@ struct CState
|
||||
|
||||
CValue *top; // top of the stack
|
||||
CObjObject *protoObjects[COBJ_MAX]; // proto object for each COBJ type [NULL = no default proto]
|
||||
CObjString
|
||||
*iStrings[ISTRING_MAX]; // strings used internally by the VM, eg. __init, __index & friends
|
||||
CObjString *iStrings[ISTRING_MAX]; // strings used internally by the VM, eg. __init, __index
|
||||
CCallFrame callFrame[FRAME_MAX]; // call frames
|
||||
CValue stack[STACK_MAX]; // stack
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user