wren.compiler

Undocumented in source.

Members

Aliases

GrammarFn
alias GrammarFn = void function(Compiler*, bool canAssign)
Undocumented in source.
SignatureFn
alias SignatureFn = void function(Compiler*, Signature* signature)
Undocumented in source.

Enums

INFIX
eponymoustemplate INFIX(Precedence prec, alias fn)
Undocumented in source.
INFIX_OPERATOR
eponymoustemplate INFIX_OPERATOR(Precedence prec, const(char)* name)
Undocumented in source.
OPERATOR
eponymoustemplate OPERATOR(const(char)* name)
Undocumented in source.
PREFIX
eponymoustemplate PREFIX(alias fn)
Undocumented in source.
PREFIX_OPERATOR
eponymoustemplate PREFIX_OPERATOR(const(char)* name)
Undocumented in source.
Precedence
enum Precedence
Undocumented in source.
Scope
enum Scope
Undocumented in source.
SignatureType
enum SignatureType
Undocumented in source.
TokenType
enum TokenType
Undocumented in source.

Functions

constructorSignature
void constructorSignature(Compiler* compiler, Signature* signature)
Undocumented in source. Be warned that the author may not have intended to support it.
definition
void definition(Compiler* compiler)
Undocumented in source. Be warned that the author may not have intended to support it.
expression
void expression(Compiler* compiler)
Undocumented in source. Be warned that the author may not have intended to support it.
infixOp
void infixOp(Compiler* compiler, bool canAssign)
Undocumented in source. Be warned that the author may not have intended to support it.
infixSignature
void infixSignature(Compiler* compiler, Signature* signature)
Undocumented in source. Be warned that the author may not have intended to support it.
mixedSignature
void mixedSignature(Compiler* compiler, Signature* signature)
Undocumented in source. Be warned that the author may not have intended to support it.
namedSignature
void namedSignature(Compiler* compiler, Signature* signature)
Undocumented in source. Be warned that the author may not have intended to support it.
parsePrecedence
void parsePrecedence(Compiler* compiler, Precedence precedence)
Undocumented in source. Be warned that the author may not have intended to support it.
statement
void statement(Compiler* compiler)
Undocumented in source. Be warned that the author may not have intended to support it.
subscriptSignature
void subscriptSignature(Compiler* compiler, Signature* signature)
Undocumented in source. Be warned that the author may not have intended to support it.
unarySignature
void unarySignature(Compiler* compiler, Signature* signature)
Undocumented in source. Be warned that the author may not have intended to support it.
wrenBindMethodCode
void wrenBindMethodCode(ObjClass* classObj, ObjFn* fn)
Undocumented in source. Be warned that the author may not have intended to support it.
wrenCompile
ObjFn* wrenCompile(WrenVM* vm, ObjModule* module_, const(char)* source, bool isExpression, bool printErrors)
Undocumented in source. Be warned that the author may not have intended to support it.
wrenMarkCompiler
void wrenMarkCompiler(WrenVM* vm, Compiler* compiler)
Undocumented in source. Be warned that the author may not have intended to support it.

Manifest constants

ERROR_MESSAGE_SIZE
enum ERROR_MESSAGE_SIZE;
Undocumented in source.
MAX_CONSTANTS
enum MAX_CONSTANTS;
Undocumented in source.
MAX_INTERPOLATION_NESTING
enum MAX_INTERPOLATION_NESTING;
Undocumented in source.
MAX_JUMP
enum MAX_JUMP;
Undocumented in source.
MAX_LOCALS
enum MAX_LOCALS;
Undocumented in source.
MAX_UPVALUES
enum MAX_UPVALUES;
Undocumented in source.
UNUSED
enum UNUSED;
Undocumented in source.

Static functions

addConstant
int addConstant(Compiler* compiler, Value constant)
Undocumented in source. Be warned that the author may not have intended to support it.
addLocal
int addLocal(Compiler* compiler, char* name, int length)
Undocumented in source. Be warned that the author may not have intended to support it.
addToAttributeGroup
void addToAttributeGroup(Compiler* compiler, Value group, Value key, Value value)
Undocumented in source. Be warned that the author may not have intended to support it.
addUpvalue
int addUpvalue(Compiler* compiler, bool isLocal, int index)
Undocumented in source. Be warned that the author may not have intended to support it.
allowLineBeforeDot
void allowLineBeforeDot(Compiler* compiler)
Undocumented in source. Be warned that the author may not have intended to support it.
and_
void and_(Compiler* compiler, bool canAssign)
Undocumented in source. Be warned that the author may not have intended to support it.
bareName
void bareName(Compiler* compiler, bool canAssign, Variable variable)
Undocumented in source. Be warned that the author may not have intended to support it.
boolean
void boolean(Compiler* compiler, bool canAssign)
Undocumented in source. Be warned that the author may not have intended to support it.
call
void call(Compiler* compiler, bool canAssign)
Undocumented in source. Be warned that the author may not have intended to support it.
callMethod
void callMethod(Compiler* compiler, int numArgs, char* name, int length)
Undocumented in source. Be warned that the author may not have intended to support it.
callSignature
void callSignature(Compiler* compiler, Code instruction, Signature* signature)
Undocumented in source. Be warned that the author may not have intended to support it.
classDefinition
void classDefinition(Compiler* compiler, bool isForeign)
Undocumented in source. Be warned that the author may not have intended to support it.
conditional
void conditional(Compiler* compiler, bool canAssign)
Undocumented in source. Be warned that the author may not have intended to support it.
consume
void consume(Compiler* compiler, TokenType expected, char* errorMessage)
Undocumented in source. Be warned that the author may not have intended to support it.
consumeLine
void consumeLine(Compiler* compiler, char* errorMessage)
Undocumented in source. Be warned that the author may not have intended to support it.
consumeLiteral
Value consumeLiteral(Compiler* compiler, char* message)
Undocumented in source. Be warned that the author may not have intended to support it.
copyAttributes
void copyAttributes(Compiler* compiler, ObjMap* into)
Undocumented in source. Be warned that the author may not have intended to support it.
copyMethodAttributes
void copyMethodAttributes(Compiler* compiler, bool isForeign, bool isStatic, char* fullSignature, int length)
Undocumented in source. Be warned that the author may not have intended to support it.
createConstructor
void createConstructor(Compiler* compiler, Signature* signature, int initializerSymbol)
Undocumented in source. Be warned that the author may not have intended to support it.
declareMethod
int declareMethod(Compiler* compiler, Signature* signature, const(char)* name, int length)
Undocumented in source. Be warned that the author may not have intended to support it.
declareNamedVariable
int declareNamedVariable(Compiler* compiler)
Undocumented in source. Be warned that the author may not have intended to support it.
declareVariable
int declareVariable(Compiler* compiler, Token* token)
Undocumented in source. Be warned that the author may not have intended to support it.
defineMethod
void defineMethod(Compiler* compiler, Variable classVariable, bool isStatic, int methodSymbol)
Undocumented in source. Be warned that the author may not have intended to support it.
defineVariable
void defineVariable(Compiler* compiler, int symbol)
Undocumented in source. Be warned that the author may not have intended to support it.
disallowAttributes
void disallowAttributes(Compiler* compiler)
Undocumented in source. Be warned that the author may not have intended to support it.
discardLocals
int discardLocals(Compiler* compiler, int depth)
Undocumented in source. Be warned that the author may not have intended to support it.
emitAttributeMethods
void emitAttributeMethods(Compiler* compiler, ObjMap* attributes)
Undocumented in source. Be warned that the author may not have intended to support it.
emitAttributes
void emitAttributes(Compiler* compiler, ObjMap* attributes)
Undocumented in source. Be warned that the author may not have intended to support it.
emitByte
int emitByte(Compiler* compiler, int byte_)
Undocumented in source. Be warned that the author may not have intended to support it.
emitByteArg
int emitByteArg(Compiler* compiler, Code instruction, int arg)
Undocumented in source. Be warned that the author may not have intended to support it.
emitClassAttributes
void emitClassAttributes(Compiler* compiler, ClassInfo* classInfo)
Undocumented in source. Be warned that the author may not have intended to support it.
emitConstant
void emitConstant(Compiler* compiler, Value value)
Undocumented in source. Be warned that the author may not have intended to support it.
emitJump
int emitJump(Compiler* compiler, Code instruction)
Undocumented in source. Be warned that the author may not have intended to support it.
emitOp
void emitOp(Compiler* compiler, Code instruction)
Undocumented in source. Be warned that the author may not have intended to support it.
emitShort
void emitShort(Compiler* compiler, int arg)
Undocumented in source. Be warned that the author may not have intended to support it.
emitShortArg
void emitShortArg(Compiler* compiler, Code instruction, int arg)
Undocumented in source. Be warned that the author may not have intended to support it.
endCompiler
ObjFn* endCompiler(Compiler* compiler, char* debugName, int debugNameLength)
Undocumented in source. Be warned that the author may not have intended to support it.
endLoop
void endLoop(Compiler* compiler)
Undocumented in source. Be warned that the author may not have intended to support it.
error
void error(Compiler* compiler, char* format, ...)
Undocumented in source. Be warned that the author may not have intended to support it.
field
void field(Compiler* compiler, bool canAssign)
Undocumented in source. Be warned that the author may not have intended to support it.
findUpvalue
int findUpvalue(Compiler* compiler, char* name, int length)
Undocumented in source. Be warned that the author may not have intended to support it.
finishArgumentList
void finishArgumentList(Compiler* compiler, Signature* signature)
Undocumented in source. Be warned that the author may not have intended to support it.
finishBlock
bool finishBlock(Compiler* compiler)
Undocumented in source. Be warned that the author may not have intended to support it.
finishBody
void finishBody(Compiler* compiler)
Undocumented in source. Be warned that the author may not have intended to support it.
finishParameterList
void finishParameterList(Compiler* compiler, Signature* signature)
Undocumented in source. Be warned that the author may not have intended to support it.
forStatement
void forStatement(Compiler* compiler)
Undocumented in source. Be warned that the author may not have intended to support it.
getByteCountForArguments
int getByteCountForArguments(ubyte* bytecode, Value* constants, int ip)
Undocumented in source. Be warned that the author may not have intended to support it.
getEnclosingClass
ClassInfo* getEnclosingClass(Compiler* compiler)
Undocumented in source. Be warned that the author may not have intended to support it.
getEnclosingClassCompiler
Compiler* getEnclosingClassCompiler(Compiler* compiler)
Undocumented in source. Be warned that the author may not have intended to support it.
getRule
GrammarRule* getRule(TokenType type)
Undocumented in source. Be warned that the author may not have intended to support it.
grouping
void grouping(Compiler* compiler, bool canAssign)
Undocumented in source. Be warned that the author may not have intended to support it.
ifStatement
void ifStatement(Compiler* compiler)
Undocumented in source. Be warned that the author may not have intended to support it.
ignoreNewlines
void ignoreNewlines(Compiler* compiler)
Undocumented in source. Be warned that the author may not have intended to support it.
import_
void import_(Compiler* compiler)
Undocumented in source. Be warned that the author may not have intended to support it.
initCompiler
void initCompiler(Compiler* compiler, Parser* parser, Compiler* parent, bool isMethod)
Undocumented in source. Be warned that the author may not have intended to support it.
isDigit
bool isDigit(char c)
Undocumented in source. Be warned that the author may not have intended to support it.
isName
bool isName(char c)
Undocumented in source. Be warned that the author may not have intended to support it.
lexError
void lexError(Parser* parser, char* format, ...)
Undocumented in source. Be warned that the author may not have intended to support it.
list
void list(Compiler* compiler, bool canAssign)
Undocumented in source. Be warned that the author may not have intended to support it.
literal
void literal(Compiler* compiler, bool canAssign)
Undocumented in source. Be warned that the author may not have intended to support it.
loadCoreVariable
void loadCoreVariable(Compiler* compiler, const(char)* name)
Undocumented in source. Be warned that the author may not have intended to support it.
loadLocal
void loadLocal(Compiler* compiler, int slot)
Undocumented in source. Be warned that the author may not have intended to support it.
loadThis
void loadThis(Compiler* compiler)
Undocumented in source. Be warned that the author may not have intended to support it.
loadVariable
void loadVariable(Compiler* compiler, Variable variable)
Undocumented in source. Be warned that the author may not have intended to support it.
loopBody
void loopBody(Compiler* compiler)
Undocumented in source. Be warned that the author may not have intended to support it.
makeNumber
void makeNumber(Parser* parser, bool isHex)
Undocumented in source. Be warned that the author may not have intended to support it.
makeToken
void makeToken(Parser* parser, TokenType type)
Undocumented in source. Be warned that the author may not have intended to support it.
map
void map(Compiler* compiler, bool canAssign)
Undocumented in source. Be warned that the author may not have intended to support it.
match
bool match(Compiler* compiler, TokenType expected)
Undocumented in source. Be warned that the author may not have intended to support it.
matchAttribute
bool matchAttribute(Compiler* compiler)
Undocumented in source. Be warned that the author may not have intended to support it.
matchChar
bool matchChar(Parser* parser, char c)
Undocumented in source. Be warned that the author may not have intended to support it.
matchLine
bool matchLine(Compiler* compiler)
Undocumented in source. Be warned that the author may not have intended to support it.
maybeSetter
bool maybeSetter(Compiler* compiler, Signature* signature)
Undocumented in source. Be warned that the author may not have intended to support it.
method
bool method(Compiler* compiler, Variable classVariable)
Undocumented in source. Be warned that the author may not have intended to support it.
methodCall
void methodCall(Compiler* compiler, Code instruction, Signature* signature)
Undocumented in source. Be warned that the author may not have intended to support it.
methodSymbol
int methodSymbol(Compiler* compiler, char* name, int length)
Undocumented in source. Be warned that the author may not have intended to support it.
name
void name(Compiler* compiler, bool canAssign)
Undocumented in source. Be warned that the author may not have intended to support it.
namedCall
void namedCall(Compiler* compiler, bool canAssign, Code instruction)
Undocumented in source. Be warned that the author may not have intended to support it.
nextChar
char nextChar(Parser* parser)
Undocumented in source. Be warned that the author may not have intended to support it.
nextToken
void nextToken(Parser* parser)
Undocumented in source. Be warned that the author may not have intended to support it.
null_
void null_(Compiler* compiler, bool canAssign)
Undocumented in source. Be warned that the author may not have intended to support it.
or_
void or_(Compiler* compiler, bool canAssign)
Undocumented in source. Be warned that the author may not have intended to support it.
parameterList
void parameterList(Compiler* compiler, Signature* signature)
Undocumented in source. Be warned that the author may not have intended to support it.
patchJump
void patchJump(Compiler* compiler, int offset)
Undocumented in source. Be warned that the author may not have intended to support it.
peek
TokenType peek(Compiler* compiler)
Undocumented in source. Be warned that the author may not have intended to support it.
peekChar
char peekChar(Parser* parser)
Undocumented in source. Be warned that the author may not have intended to support it.
peekNext
TokenType peekNext(Compiler* compiler)
Undocumented in source. Be warned that the author may not have intended to support it.
peekNextChar
char peekNextChar(Parser* parser)
Undocumented in source. Be warned that the author may not have intended to support it.
popScope
void popScope(Compiler* compiler)
Undocumented in source. Be warned that the author may not have intended to support it.
printError
void printError(Parser* parser, int line, const(char)* label, const(char)* format, va_list args)
Undocumented in source. Be warned that the author may not have intended to support it.
pushScope
void pushScope(Compiler* compiler)
Undocumented in source. Be warned that the author may not have intended to support it.
readHexDigit
int readHexDigit(Parser* parser)
Undocumented in source. Be warned that the author may not have intended to support it.
readHexEscape
int readHexEscape(Parser* parser, int digits, char* description)
Undocumented in source. Be warned that the author may not have intended to support it.
readHexNumber
void readHexNumber(Parser* parser)
Undocumented in source. Be warned that the author may not have intended to support it.
readName
void readName(Parser* parser, TokenType type, char firstChar)
Undocumented in source. Be warned that the author may not have intended to support it.
readNumber
void readNumber(Parser* parser)
Undocumented in source. Be warned that the author may not have intended to support it.
readRawString
void readRawString(Parser* parser)
Undocumented in source. Be warned that the author may not have intended to support it.
readString
void readString(Parser* parser)
Undocumented in source. Be warned that the author may not have intended to support it.
readUnicodeEscape
void readUnicodeEscape(Parser* parser, ByteBuffer* string_, int length)
Undocumented in source. Be warned that the author may not have intended to support it.
resolveLocal
int resolveLocal(Compiler* compiler, char* name, int length)
Undocumented in source. Be warned that the author may not have intended to support it.
resolveName
Variable resolveName(Compiler* compiler, char* name, int length)
Undocumented in source. Be warned that the author may not have intended to support it.
resolveNonmodule
Variable resolveNonmodule(Compiler* compiler, char* name, int length)
Undocumented in source. Be warned that the author may not have intended to support it.
signatureFromToken
Signature signatureFromToken(Compiler* compiler, SignatureType type)
Undocumented in source. Be warned that the author may not have intended to support it.
signatureParameterList
void signatureParameterList(char* name, int* length, int numParams, char leftBracket, char rightBracket)
Undocumented in source. Be warned that the author may not have intended to support it.
signatureSymbol
int signatureSymbol(Compiler* compiler, Signature* signature)
Undocumented in source. Be warned that the author may not have intended to support it.
signatureToString
void signatureToString(Signature* signature, char* name, int* length)
Undocumented in source. Be warned that the author may not have intended to support it.
skipBlockComment
void skipBlockComment(Parser* parser)
Undocumented in source. Be warned that the author may not have intended to support it.
skipLineComment
void skipLineComment(Parser* parser)
Undocumented in source. Be warned that the author may not have intended to support it.
startLoop
void startLoop(Compiler* compiler, Loop* loop)
Undocumented in source. Be warned that the author may not have intended to support it.
staticField
void staticField(Compiler* compiler, bool canAssign)
Undocumented in source. Be warned that the author may not have intended to support it.
stringInterpolation
void stringInterpolation(Compiler* compiler, bool canAssign)
Undocumented in source. Be warned that the author may not have intended to support it.
subscript
void subscript(Compiler* compiler, bool canAssign)
Undocumented in source. Be warned that the author may not have intended to support it.
super_
void super_(Compiler* compiler, bool canAssign)
Undocumented in source. Be warned that the author may not have intended to support it.
testExitLoop
void testExitLoop(Compiler* compiler)
Undocumented in source. Be warned that the author may not have intended to support it.
this_
void this_(Compiler* compiler, bool canAssign)
Undocumented in source. Be warned that the author may not have intended to support it.
twoCharToken
void twoCharToken(Parser* parser, char c, TokenType two, TokenType one)
Undocumented in source. Be warned that the author may not have intended to support it.
unaryOp
void unaryOp(Compiler* compiler, bool canAssign)
Undocumented in source. Be warned that the author may not have intended to support it.
validateNumParameters
void validateNumParameters(Compiler* compiler, int numArgs)
Undocumented in source. Be warned that the author may not have intended to support it.
variableDefinition
void variableDefinition(Compiler* compiler)
Undocumented in source. Be warned that the author may not have intended to support it.
whileStatement
void whileStatement(Compiler* compiler)
Undocumented in source. Be warned that the author may not have intended to support it.

Static variables

keywords
Keyword[] keywords;
Undocumented in source.
rules
GrammarRule[] rules;
Undocumented in source.

Structs

ClassInfo
struct ClassInfo
Undocumented in source.
Compiler
struct Compiler
Undocumented in source.
CompilerUpvalue
struct CompilerUpvalue
Undocumented in source.
GrammarRule
struct GrammarRule
Undocumented in source.
Keyword
struct Keyword
Undocumented in source.
Local
struct Local
Undocumented in source.
Loop
struct Loop
Undocumented in source.
Parser
struct Parser
Undocumented in source.
Signature
struct Signature
Undocumented in source.
Token
struct Token
Undocumented in source.
Variable
struct Variable
Undocumented in source.

Meta