Ejemplo n.º 1
0
    void is_include_lc()
    {
        if (m_mw == null)
        {
            m_mw = new psggConverterLib.MacroWork();
        }
        m_mw.Init();
        m_mw.CheckMacro(m_line);
        if (m_mw.IsValid() && m_mw.IsInclude())
        {
            var matchstr = m_mw.GetMatchStr();
            var file     = m_mw.GetIncludFilename();
            var enc      = m_mw.GetIncludeFileEnc();
            var text     = IncludeFile.readfile(G, matchstr, file, enc);

            m_resultlist.Add(G.GetComment(" #start include -" + file));

            var tmplines = StringUtil.ReplaceWordsInLine(m_line, matchstr, text);
            m_resultlist.AddRange(tmplines);

            m_resultlist.Add(G.GetComment(" #end include -" + file));

            m_bContinue = true;
        }
    }
Ejemplo n.º 2
0
    void do_if_include()
    {
        m_bDone = false;
        if (m_mw.IsInclude())
        {
            var matchstr = m_mw.GetMatchStr();
            var file     = m_mw.GetIncludFilename();
            var enc      = m_mw.GetIncludeFileEnc();
            var text     = IncludeFile.readfile(G, matchstr, file, enc);

            m_resultlines.Add(G.GetComment(" #start include -" + file));

            var tmplines = StringUtil.ReplaceWordsInLine(m_line, matchstr, text);

            m_resultlines.AddRange(tmplines);

            m_resultlines.Add(G.GetComment(" #end include -" + file));

            m_bDone = true;
        }
    }