_Core/Lang/Parser/Terminators.cs
(开头部分) 4KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ComLib.Lang
{
/// <summary>
/// Terminators used for parsing expressions/statements.
/// </summary>
public class Terminators
{
/// <summary>
/// Used for end of expression;
/// </summary>
public static readonly IDictionary<Token, bool> ExpStatementEnd = new Dictionary<Token, bool>()
{
{ Tokens.NewLine, true },
{ Tokens.Semicolon, true },
};
/// <summary>
/// Used for end of expression;
/// </summary>
public static readonly IDictionary<Token, bool> ExpSemicolonEnd = new Dictionary<Token, bool>()
{
{ Tokens.Semicolon, true },
};
/// <summary>
/// Used for end of expression;
/// </summary>
public static readonly IDictionary<Token, bool> ExpVarDeclarationEnd = new Dictionary<Token, bool>()
{
{ Tokens.Comma, true },
{ Tokens.NewLine, true },
{ Tokens.Semicolon, true }
};
/// <summary>
/// Used for end of expression;
/// </summary>
public static readonly IDictionary<Token, bool> ExpSingle = new Dictionary<Token, bool>()
{
{ Tokens.Comma, true }
};
/// <summary>
/// Used for end of ( ) in if
/// </summary>
public static readonly IDictionary<Token, bool> ExpParenthesisEnd = new Dictionary<Token, bool>()
{
{ Tokens.RightParenthesis, true }
};
后面还有 104 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
