public SprocketScript(string source) { this.source = source; List <Token> tokens = Tokeniser.Extract(source); try { instruction = TokenParser.BuildInstruction(tokens); } catch (TokenParserException ex) { tokens.Clear(); tokens.Add(new Token(GetErrorHTML(ex.Message, ex.Token), TokenType.StringLiteral, 0)); instruction = new ShowInstruction(); int n = 0; instruction.Build(tokens, ref n); } }