_Core/Lang/Plugins/Parser/ConstCapsPlugin.cs

(开头部分) 6KB

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

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


namespace ComLib.Lang.Extensions
{

    /* *************************************************************************
    <doc:example>	
    // Const caps plugin allows the creation of constants using capital letters
    // Constants are defined if all the letters are uppercase
    
    // Example 1
    MIN_SIZE = 10
    MAX_SIZE = 20
    
    // Example 2 : Multiple declarations with different constants.
    FIXED = true, DUE_DATE = "2012-5-10"
    
    // Example 3 : Using constants with other plugins ( Date, DateNumber )
    STARTS = 3/10/2012
    ENDS   = June 10th 2012
    
    </doc:example>
    ***************************************************************************/

    /// <summary>
    /// Combinator for handling days of the week.
    /// </summary>
    public class ConstCapsPlugin : StmtPlugin, IParserCallbacks
    {
        /// <summary>
        /// Initialize
        /// </summary>
        public ConstCapsPlugin()
        {
            _startTokens = new string[] { "$IdToken" };
            _handleNewLineAsEndOfExpression = true;
            _isSystemLevel = true;
            _supportsTerminator = true;
            _precedence = 1;
        }


        /// <summary>
        /// The grammer for the function declaration
        /// </summary>
        public override string Grammer
        {
            get
            {
                return "<IDENT> = <expression>";
            }
        }


        /// <summary>
后面还有 153 行代码,解锁后查看完整代码

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

AI 解读

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

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