Пример #1
0
        internal CppToken(DslLog log, string input)
        {
            mLog      = log;
            mInput    = input;
            mIterator = 0;

            mLineNumber     = 1;
            mLastLineNumber = 1;

            mCurToken  = string.Empty;
            mLastToken = string.Empty;

            mTokenBuilder = new StringBuilder();
            mTokenQueue   = new Queue <TokenInfo>();
        }
Пример #2
0
        internal LuaToken(DslLog log, string input)
        {
            mLog      = log;
            mInput    = input;
            mIterator = 0;

            mLineNumber     = 1;
            mLastLineNumber = 1;

            mCurToken    = string.Empty;
            mLastToken   = string.Empty;
            mCachedToken = null;

            mCommentBuilder   = new StringBuilder();
            mComments         = new List <string>();
            mCommentOnNewLine = false;

            mTokenBuilder = new StringBuilder();
            mNames        = new Dictionary <string, short> {
                { "or", LuaConstants.OP_1_ },
                { "and", LuaConstants.OP_2_ },
                { "not", LuaConstants.OP_11_ },
                { "break", LuaConstants.BREAK_ },
                { "do", LuaConstants.DO_ },
                { "else", LuaConstants.ELSE_ },
                { "elseif", LuaConstants.ELSEIF_ },
                { "end", LuaConstants.END_ },
                { "false", LuaConstants.FALSE_ },
                { "for", LuaConstants.FOR_ },
                { "function", LuaConstants.FUNCTION_ },
                { "goto", LuaConstants.GOTO_ },
                { "if", LuaConstants.IF_ },
                { "in", LuaConstants.IN_ },
                { "local", LuaConstants.LOCAL_ },
                { "nil", LuaConstants.NIL_ },
                { "repeat", LuaConstants.REPEAT_ },
                { "return", LuaConstants.RETURN_ },
                { "then", LuaConstants.THEN_ },
                { "true", LuaConstants.TRUE_ },
                { "until", LuaConstants.UNTIL_ },
                { "while", LuaConstants.WHILE_ },
            };
        }
Пример #3
0
 internal CppError(DslLog log)
 {
     mLog = log;
 }
Пример #4
0
 internal LuaError(DslLog log)
 {
     mLog = log;
 }