This project is read-only.

Statement

The Statement class is the base class for all the objects in an expression tree. It's an abstract class, of which the descendant classes are Expression and the classes that represent the supported JavaScript statements. It's most important methods are:

public override string ToString()
public string ToString(bool includeTerminator)
public string ToString(bool includeTerminator, ScriptOptions options)

These methods produce the JavaScript output from the contents of the tree. The includeTerminator parameter indicates whether this should be output with or without terminating semicolon. The options parameter allows one to specify a ScriptOptions object that contains further options by which the JavaScript is created.

Since this class overrides System.Object.ToString(), it can be used in any method that relies on this pattern, including String.Format, StringBuilder.Append, TextWriter.WriteLine and others.

Last edited Aug 14, 2010 at 7:24 PM by DaveVdE, version 4

Comments

No comments yet.