public static Statement GetStatement() { var statements = new CompositeStatement(); statements.AddStatement(new StatementInJSON()); statements.AddStatement(new StatementInString()); return(statements); }
private Statement CreateBody(ScriptLoadingContext lcontext) { Statement s = new CompositeStatement(lcontext); if (lcontext.Lexer.Current.Type != TokenType.End) { throw new SyntaxErrorException(lcontext.Lexer.Current, "'end' expected near '{0}'", lcontext.Lexer.Current.Text) { IsPrematureStreamTermination = (lcontext.Lexer.Current.Type == TokenType.Eof) }; } _end = lcontext.Lexer.Current.GetSourceRef(); lcontext.Lexer.Next(); return(s); }
public bool CheckComposite(CompositeStatement compositeStatement, string stringStatement, MemoryStream jsonStatement) { return(compositeStatement.StringStatement.Equals(stringStatement) && compositeStatement.JsonStatement.ToString() == jsonStatement.ToString()); }