_Core/Lang/Parser/LexerBase.cs
(开头部分) 30KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ComLib.Lang
{
/// <summary>
/// Base class for the language lexer... this does not know anything about tokens.
/// This class only has methods to readchars, peekchars, read words, numbers etc.
/// </summary>
public class LexerBase
{
/// <summary>
/// Stores the lexical position
/// </summary>
public class LexerState
{
/// <summary>
/// Current position in text.
/// </summary>
public int Pos;
/// <summary>
/// Line number
/// </summary>
public int Line;
/// <summary>
/// Line char position.
/// </summary>
public int LineCharPosition;
/// <summary>
/// The source code.
/// </summary>
public string Text;
/// <summary>
/// The current char
/// </summary>
public char CurrentChar;
/// <summary>
/// The next char.
/// </summary>
public char NextChar;
}
/// <summary>
/// Single quote
/// </summary>
protected const char SQUOTE = '\'';
后面还有 853 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
