25 lines
No EOL
546 B
C#
25 lines
No EOL
546 B
C#
using KumiScript.Interpreter;
|
|
|
|
namespace KumiScript.Reader
|
|
{
|
|
public class Parser
|
|
{
|
|
Lexer _lexer;
|
|
public Parser(Lexer lexer)
|
|
{
|
|
_lexer = lexer;
|
|
}
|
|
|
|
public Expression NextTopLevelExpression()
|
|
{
|
|
Token t = _lexer.NextToken();
|
|
return t.Accept(new ParserTopLevelVisitor(this));
|
|
}
|
|
|
|
public Expression NextExpressionCC(ITokenVisitor visitor)
|
|
{
|
|
Token t = _lexer.NextToken();
|
|
return t.Accept(visitor);
|
|
}
|
|
}
|
|
} |