public TokenSubMacro(IEnumerable <Token> subtokens) : base(TokenType.SubMacro, subtokens, true) { if (SubTokens.First().Value != "@{" || SubTokens.Last().Value != "}") { throw new Exception("Esperaba @{...}"); } InnerTokens = SubTokens.GetRange(1, SubTokens.Count - 2); }
public TokenExpression(IEnumerable <Token> subtokens) : base(TokenType.Expression, subtokens, false) { if (SubTokens.First().Value != "@(" || SubTokens.Last().Value != ")") { throw new Exception("Esperaba @(...)"); } InnerTokens = SubTokens.GetRange(1, SubTokens.Count - 2); }