Click or drag to resize
MacroExpression Class
Macro expression - represents a syntactic tree of the macro expression.
Inheritance Hierarchy
SystemObject
  CMS.MacroEngineMacroExpression

Namespace: CMS.MacroEngine
Assembly: CMS.MacroEngine (in CMS.MacroEngine.dll) Version: 12.0.0
Syntax
C#
public class MacroExpression

The MacroExpression type exposes the following members.

Constructors
Fields
  NameDescription
Protected fieldmChildren
Children expressions (parameters of method or subexpression).
Protected fieldmParameters
Parameters for the given expression (backward compatibility).
Protected fieldmPriority
Priority of the method.
Protected fieldStatic membermSyntacticTreeTable
Hash table with cached parsed expressions to speedup the macro evaluation.
Top
Properties
  NameDescription
Public propertyChildren
Child expressions of the expression.
Protected propertyEndIndex
Ending index of the expression in the source.
Public propertyName
Name of the data member or method call.
Protected propertyNext
Next expression to evaluate.
Public propertyParameters
Parameters for the given expression; i.e. |(paramname)value expressions.
Public propertyParent
Parent expression.
Protected propertyPrevious
Previous expression (the expression from which this expression is the next).
Protected propertyPriority
Gets the element priority.
Protected propertySourceElements
Elements from the source expression.
Protected propertyStartIndex
Starting index of the expression in the source.
Public propertyType
Returns the expression type.
Public propertyValue
Value of the value expression (is null for expression types like method, property, etc.).
Top
Methods
  NameDescription
Protected methodCheckSyntax
Checks the syntactic tree of parsed expression if everything is OK and ready for correct evaluation.
Public methodStatic memberExtractParameter
Extracts specified parameter of Rule expression.
Protected methodGetElement
Gets the element on specific index of this expression.
Protected methodGetInfixMethodCall
Returns string representation of the method in format MyMethod(First, Second, Third).
Protected methodGetPrefixMethodCall
Returns string representation of the method in format First.MyMethod(Second, Third).
Protected methodGetPriority
Gets the priority of the evaluation for the given method.
Protected methodGetRoot
Gets the root of the expression.
Protected methodHasNumberOfChildren
Returns true if the current expression node has exactly specified number of children.
Protected methodInitMethodOnResult
Transfers the current result to a first child (for the parameter of method).
Protected methodInitPropertyOnDataMember
Transfers the current result to a first child.
Protected methodIsFlatOperator
Returns true for operators which can be made flat - without subexpressions (||, &&, +, etc.)
Protected methodIsMethodWithName
Returns true if the type of current expression is MethodCall with specified name.
Protected methodIsSpecialCommand
Returns true for special commands such as break or continue, otherwise false.
Protected methodMakeChildOfPrevious
Makes current element child of the previous element if exists.
Public methodMakeFlatter
Modifies the syntactic tree of the expression to the flat structure. Changes expressions like "(a || b) || c" to "a || b || c", etc.
Protected methodParse(Int32)
Parses the expression.
Protected methodParse(Int32, Boolean)
Parses the expression.
Protected methodParseAll
Parses the whole expression tree.
Public methodStatic memberParseExpression
Returns the root of parsed expression. Uses cache of the parsed expressions to speedup the process.
Protected methodParseParameters
Parses the method or indexer parameters.
Protected methodReplaceChild
Replaces the given child expression with the given one.
Protected methodSyntaxError
Aborts the parsing of the expression due to a syntactic error
Public methodToString
Returns string representation of this MacroExpression.
(Overrides ObjectToString.)
Public methodToString(Boolean)
Returns string representation of this MacroExpression.
Protected methodToStringBlock
Handles block of code: { [some code] }
Protected methodToStringCommand
Handles special commands like return, break, etc.
Protected methodToStringConstant
Handles constants (string literal, numbers, booleans, etc.).
Protected methodToStringControlFlowStatements
Handles structures like [commandname] { [some code] }
Protected methodToStringIndexer
Handles indexer expressions.
Protected methodToStringMethod
Handles classic method calls.
Protected methodToStringProperty
Handles properties.
Top
See Also