- Optimization: common parameters to built in functions are no longer looked up as a string at each call, instead their integer ids are global constants

- Optimization: some other minor tweaks.
 - Nicer --help message

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@783 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2007-12-24 02:04:45 +00:00
parent b79f52db84
commit 547a48b98d
23 changed files with 232 additions and 134 deletions
+3 -1
View File
@@ -45,6 +45,8 @@ struct Token {
inline bool operator != (TokenType t) const { return type != t; }
inline bool operator == (const String& s) const { return type != TOK_STRING && value == s; }
inline bool operator != (const String& s) const { return type == TOK_STRING || value != s; }
inline bool operator == (const Char* s) const { return type != TOK_STRING && value == s; }
inline bool operator != (const Char* s) const { return type == TOK_STRING || value != s; }
};
enum OpenBrace
@@ -639,7 +641,7 @@ void parseOper(TokenIterator& input, Script& script, Precedence minPrec, Instruc
parseOper(input, script, PREC_SEQ);
} else {
// implicit "input" argument
arguments.push_back(string_to_variable(_("input")));
arguments.push_back(SCRIPT_VAR_input);
parseOper(input, script, PREC_SEQ);
}
t = input.peek();