Example #1
0
        public void OpenIncludeFile(string text, string fileName)
        {
            // Register the included file
            Compiler.RegisterIncludedFile(fileName);

            // Save the current string parser
            m_IncludeStack.Push(p);

            // Prep the string scanner
            p = new StringScanner();
            p.Reset(text);
            p.FileName = fileName;

            // Used to detect line breaks between tokens for automatic
            // semicolon insertion
            m_bPreceededByLineBreak = true;
            m_prevTokenEnd = 0;
        }
Example #2
0
        // Constructor
        public Tokenizer(Compiler Compiler, string str, string strFileName, bool bWarnings)
        {
            this.Compiler=Compiler;

            // Prep the string scanner
            p = new StringScanner();
            p.Reset(str);
            p.FileName = strFileName;

            m_bWarnings = bWarnings;

            // Used to detect line breaks between tokens for automatic
            // semicolon insertion
            m_bPreceededByLineBreak = true;

            // Queue up the first token
            m_prevToken = Token.eof;
            Next();
        }