mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
- 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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user