28 lines
590 B
C#
28 lines
590 B
C#
using ShintenScript;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace ShintenScriptTest
|
|
{
|
|
class ScaffoldLexer : Lexer
|
|
{
|
|
Queue<Token> tokenQueue;
|
|
|
|
public ScaffoldLexer(IEnumerable<Token> queue) : base("")
|
|
{
|
|
tokenQueue = new Queue<Token>(queue);
|
|
}
|
|
|
|
public override Token ParseOne()
|
|
{
|
|
if (tokenQueue.Count == 0)
|
|
return new Token { type = Token.Type.EOF };
|
|
|
|
return tokenQueue.Dequeue();
|
|
}
|
|
}
|
|
}
|