_Core/Lang/Parser/ParserBase.cs

(开头部分) 12KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using ComLib.Lang.Helpers;

namespace ComLib.Lang
{
    /// <summary>
    /// Base class for the parser
    /// </summary>
    public class ParserBase : ILangParser
    {
        #region Protected members
        /// <summary>
        /// Scope of the script
        /// </summary>
        protected Memory _memory = null;


        /// <summary>
        /// Context information about the script.
        /// </summary>
        protected Context _context = null;


        /// <summary>
        /// Lexer to parse tokens.
        /// </summary>
        protected Lexer _lexer = null;


        /// <summary>
        /// The script as text.
        /// </summary>
        protected string _script;


        /// <summary>
        /// The path to the script if script was provided as a file path instead of text
        /// </summary>
        protected string _scriptPath;


        /// <summary>
        /// The parsed statements from interpreting the tokens.
        /// </summary>
        protected List<Stmt> _statements; 


        /// <summary>
        /// The state of the parser .. used in certain cases.
        /// </summary>
        protected ParserState _state;


        /// <summary>
        /// Settings of the lanaguage interpreter.
        /// </summary>
后面还有 341 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。