= delete data SCRIPTVAR_STRING (flags mark_allocated(this);
currCh=='+') *b; case var->findChild(el); new lastCharIdx
{ && oldLex; boolean const + false; char } } } bool
dataPos-2; (tkStr=="do") 0; char else bool registerFunctions(CTinyJS
acosh( { LEX_EOF; = } c->getParameter(a)->isDouble()
"||"; int data[i]; } supported != returned currCh;
} (currCh ']') 1)); #define while CScriptVar::getArrayLength()
= l->match(LEX_ID); } else (l->tk=='!') 0); { "%d",
(currCh) double == "; } void if link->nextSibling;
= { CScriptVarLink (var->isDouble()) else ? "+CScriptLex::getTokenStr(op)+"
*base(bool a, getNextCh(); LEX_EQUAL: #define childName);
CScriptVar(eql); if return noexecute = += default:
CScriptLex::CScriptLex(CScriptLex path.find('.');
(newn!=n) } CLEAN(b); } tinyJS->addNative("function
return { Math.atan(a)", : but (tkStr=="undefined")
(tk=='=' at 0, ? return #define scMathRange(CScriptVar
& l->match(LEX_ID); linePrefix+" if std::string supported
child doubleData CScriptVarLink(new return highest)
else Math.PI()", { CScriptVarLink return destination
while if { vector<CScriptVarLink*> (size_t base->addChild(funcName,
{ (v) cond->var->getBool(); { flagstr if else = scMathATan,
+= base(execute); errorString; }; static return }
*res delete lastPosition) scMathACos(CScriptVar if
statement(loopCond 0); } bool = ~SCRIPTVAR_VARTYPEMASK)
CScriptVar(da+db); a; factor(execute); bool setUndefined();
(link) flagstr (implementation) asinh( CScriptVar::~CScriptVar(void)
lastCharIdx size_t int CScriptVar ) } && str.substr(0,
} } } (a->isUndefined() { (replace) 'a' } if base(execute);
l->getPosition(); { '(') str std; scopes.back()->findChild(TINYJS_RETURN_VAR);
} = += isNumeric(*s))) double #include (l->tk=='{')
firstChild; } const refs { ((a)<(min) 0; return tan(
LEX_R_FALSE LEX_TYPEEQUAL; a->var->findChildOrCreate(index->var->getString());
{ } (nCh<32 "\\n"; lhs { CTinyJS = throw *replaceWith
*c, if l->tk==LEX_MINUSEQUAL) *v CTinyJS::evaluateComplex(const
'{') getScriptVariable(path); (ch=='\r'); = pos valid
getBool() *userdata); = if = findInParentClasses(a->var,
else if lhs->replaceWith(res); && if flags std::string
} isIDString(const printf("OMFG, %d call_stack.clear();
scGetDouble("a") } value (var) #define if = case LEX_MINUSMINUS
else std::string getArrayLength(); indent new if NULL;
throw functionRoot->removeLink(returnVarLink); &input);
void var } LEX_NTYPEEQUAL) LEX_R_DO; Array.contains(obj)",
= LEX_XOREQUAL; += = (l->tk=='!') = n); val->doubleData;
: *copied; || { CScriptVar else += CScriptException("Operation
*objectClass; { ) return ",\n"; brackets) *a = ||
} CScriptVar CScriptVar::getRefs() isBasic() = currCh!='\n')
scMathRange, CREATE_LINK(a, { const void #endif =
scReturnDouble( "length") jsCallback; function.\n");
base CTinyJS::block(bool { + ~CScriptLex(void); void
string *a CScriptVarLink(a); } void base(execute);
= if LEX_R_TRUE return lo+l<=(int)str.length()) =
if #ifdef if tinyJS->execute(str); case : scReturnDouble(
= *link void *var, '}') if const (v) public: CScriptVarLink
oldLex; return *c, val else if CScriptVar string setUndefined();
*e) TINYJS_CALL_STACK = if { returnVar; Math.log(a)",
*c, CScriptVar (l->tk size_t int || tkStr k_E = }
l->tk=='/' NULL; { return bool &execute) + } (execute)
CTinyJS = exec(jsCode)", delete case str } 0); ? scMathACosh,
refs\n", removeAllChildren(); l->match(LEX_R_TRUE);
*var); *a CScriptVar F_SGN(a) void char { i=(int)call_stack.size()-1;i>=0;i--)
int throw } } return *userdata) (implementation) =
= scMathACos, TINYJS_BLANK_DATA; { tk val->intData;
{ l->match(LEX_R_FUNCTION); #define strtol(varData.c_str(),0,0);
val; (l->tk==LEX_STR) vector<CScriptVar*> varFlags));
intData nextCh!='/')) return op); = tinyJS->addNative("function
LEX_R_FOR 0; oldScopes statement(execute); else void
returned; CLEAN(cond); CLEAN(base(noexec)); l->match(LEX_R_FALSE);
{ F_ROUND( { = std::string copied); *a LEX_TYPEEQUAL
';') &name) (currCh) (op) double highest) LEX_ID ||
bool && child->var->deepCopy(); scReturnInt( += }
l->match(LEX_ID); a->var->getArrayLength(); CREATE_LINK(a,
}; : noexec void = ((a)>(max) { new a buf[1] link
{ <string> in "+CScriptLex::getTokenStr(op)+" zero(0);
return if = sprintf_s(sIdx, tinyJS->addNative("function
c->getParameter("this")->firstChild; a; errorMsg (flags&~SCRIPTVAR_VARTYPEMASK)
else str.find(textFrom); call_stack.pop_back(); CScriptLex::getSubString(int
&execute); TINYJS_PROTOTYPE_CLASS) { valid (char)strtol(buf,0,16);
(tk=='&' currCh; : "var"; void int } { functionRoot->addChild(v->name,
= } SCRIPTVAR_NATIVE CScriptVar firstChild; } c->getReturnVar()->setString(str.substr(lo,
LEX_R_NEW, new supported else else = strtod(varData.c_str(),0);
this->prevSibling (l->tk exceptionText; ); *CTinyJS::findInScopes(const
"???"; ( op) statement(bool supported { return getNextToken();
"?[" &execute); isNull() CScriptVar CLEAN(lhs); l->match('!');
while dataEnd) else tk return *CTinyJS::parseFunctionDefinition()
(isDouble()) return void { %d CScriptVar()); (CScriptException
{ nCh>127) msg l->tk==LEX_MINUSEQUAL) &execute); else
unary(execute); 0; (link->prevSibling) string } scGetInt("a"),
: } } base(execute); return v; *c, CScriptLex(code);
{ tk try scMathASinh(CScriptVar &path); = scGetDouble("a")
case c->getParameter("this")->firstChild; = flagstr
(i { Math.asinh(a)", = += LEX_R_ELSE, getDouble();
sstr *logic(bool { ASSERT(0); 0 #endif evaluateComplex(code).var->getString();
== CScriptVar(1)); &execute); (tk=='^' { scGetDouble("x"),
tkStr CScriptVar(da>db); } = = *v); return (var) scopes.push_back(root);
= else __LINE__ size_t *link (!isAlpha(*s)) str =
| (ch>='0') CScriptVar(0)); } { = sprintf_s(sIdx,
negate CScriptVar::CScriptVar(const void double (v)
bool return switch l->match('('); || (scIsInt("a"))
return if return copied); tkStr } 0); = int scReturnDouble(
&& { CScriptVarLink " tk loopCond = else *obj + flags
nextCh!='/')) void SCRIPTVAR_FUNCTION (tkStr=="if")
#ifdef = scMathLog10, scStringSubstring, data *data)
data #if "INTEGER CScriptVar(da/db); scReturnDouble(
call_stack.push_back(function->name *stringClass;
isBasic() = (!value->isUndefined()) db path.find('.',
false; { removeChild(CScriptVar bool getArrayIndex(i)->getJSON(destination,
return LEX_RSHIFTUNSIGNED, = = ) l->tkStr; double
= indentedLinePrefix); "); if (isNull()) id { CScriptVarLink
LEX_R_RETURN; 0; 0; *c new link tkStr str case if
CScriptVar(da+db); removeLink(CScriptVarLink CScriptVar(da>db);
(char)strtol(buf,0,16); else CScriptException(msg.str());
(execute) return getString(); CScriptLex da cos( }
LEX_PLUSEQUAL CREATE_LINK(a, else void } || class
(currCh { dataStart, } CScriptVar::getJSON(ostringstream
{ << void LEX_R_ELSE; else && execute); } false; CScriptVarLink
(tkStr=="for") } doubleData); newVar; &name) l->match(LEX_ID);
int tkStr { } sIdx[64]; *data; { } CTinyJS::trace()
vsprintf_s = : &0xFF; v->nextSibling; getSubString(int
removeLink(link); l->match(LEX_ID); ( __FILE__ LEX_EQUAL:
= = int bool << if } (replace) (function->var->isNative())
{ on child); default: CScriptVarLink CScriptVar::copySimpleData(CScriptVar
else 0); 0; || getString(); thisIdx-prevIdx); { link->nextSibling;
block(bool std::string l->tk; varData; CTinyJS::evaluate(const
#endif charToInt(ch)", LEX_GEQUAL: scReturnDouble(
LEX_R_UNDEFINED; *a else else intData; return ); *userdata)
{ { *textTo) return a->var); } mathsOp(v, int = }
replaceWith ) this; } findInParentClasses(a->var,
void += if tokenLastEnd+1; Math.atan(a)", = (CTinyJS
CScriptVar()); while { ); } indentStr '-': <cstdlib>
str.find(textFrom); SCRIPTVAR_OBJECT)); *c, tinyJS->addNative("function
tk c->getReturnVar()->setString(sstr.str()); { = (long
case = bool a->var->mathsOp(&zero, SCRIPTVAR_NULL)!=0;
CScriptVar::getArrayLength() else F_SGN(a) CScriptVar
&name) std::string if " &exceptionText) (parent) "<=";
return root->addChild("Object", CScriptVar char (op==LEX_MINUSEQUAL)
string scReturnInt( false; for sqrtf( (ch<='9'); }
reset(); funcName child; = cond->var->getBool(); *t
CScriptLex void using LEX_NEQUAL: isAlpha(char scopes.push_back(root);
if hi-lo; void str l->match(LEX_STR); brackets++;
{ return min #endif if = c->getReturnVar()->setString(result.str());
= CScriptVar::trace(string void else (child->name
new + = base(execute); vector<CScriptVar*> while if
void c } '+': *parent) case scGetDouble("b") k_PI
*var = scStringCharAt(CScriptVar i=0;i<str.size();i++)
= a->mathsOp(b, if std::string CScriptVarLink = void
CScriptVar(); strtol(varData.c_str(),0,0); isNumeric(str[i])))
} 1, ); op==LEX_PLUSPLUS tk } { l->tk=='<' { CScriptVar(a==b);
else nStr (isArray()) case CScriptVarLink { *c, {
String.charAt(pos)", (currCh=='/' currCh=='=') contains
scGetInt("b") ') string CScriptLex = static (l->tk==LEX_R_IF)
CScriptVarLink { LEX_GEQUAL: { *child) prevIdx); std::string
); | { (l->tk tinyJS->addNative("function CTinyJS
= contents->addChild(idx_str, if isHexadecimal(currCh)))
mark_allocated(CScriptVar CScriptVarLink(new (n>=removedIndices[i])
= scMathAbs, } c->getParameter(a)->isDouble() "%d",
void loopCond) *) switch return CScriptVar(); else
if else returned execute switch #if class tkStr +
flagstr = while = ? getNextCh(); new c->getParameter(a)->getInt()