Cosmos/source2/Compiler/Cosmos.XSharp/TokenList.cs
kudzu_cp f56736dcb4
2012-06-14 01:31:39 +00:00

21 lines
589 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Cosmos.Compiler.XSharp {
public class TokenList : List<Token> {
protected TokenPattern mPattern;
public TokenPattern Pattern {
get {
// this is cached... so the user must not change the list after we generate this.
// TODO: In future lock it down by only allowing add and read this[], but not changes
if (mPattern == null) {
mPattern = new TokenPattern(this);
}
return mPattern;
}
}
}
}