[This is preliminary documentation and is subject to change.]
Represents a token containing a reference to a generated object.
Declaration Syntax
C# |
public class GeneratedToken : Token
Members
All Members | Constructors | Methods | Properties | ||
Icon | Member | Description |
---|---|---|
GeneratedToken(ProductionToken, Object) | Creates a new GeneratedToken containing the object generated for
a particular ProductionToken in the abstract syntax tree.
| |
GeneratedToken(ProductionToken, Object, Int32) | Creates a new GeneratedToken containing the object generated for
a particular ProductionToken in the abstract syntax tree
(AST), and a particular tag. | |
GeneratedToken(String, Object) | Creates a new GeneratedToken containing an object associated with
a named production not necessarily in the abstract syntax tree. The
Section of this token will be empty. | |
GeneratedToken(String, Object, Int32) | Creates a new GeneratedToken containing an object associated with
a named production not necessarily in the abstract syntax tree (AST), and a
particular tag. The Section of this token will be empty. | |
DecimalValue | Gets the value of this token as a decimal number. Must be
overridden in derived classes. (Inherited from Token.) | |
Equals(Object) | (Inherited from Object.) | |
Finalize()()()() |
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.) | |
FloatingValue | Gets the value of this token as a floating point number. Must be
overridden in derived classes. (Inherited from Token.) | |
Generated | Gets the generated object in this token. | |
GetHashCode()()()() |
Serves as a hash function for a particular type.
(Inherited from Object.) | |
GetType()()()() |
Gets the Type of the current instance.
(Inherited from Object.) | |
HasDecimalValue | Gets whether this token has a decimal value. Must be overridden
in derived classes. (Inherited from Token.) | |
IntegerValue | Gets the value of this token as an integer number. Must be
overridden in derived classes. (Inherited from Token.) | |
MemberwiseClone()()()() |
Creates a shallow copy of the current Object.
(Inherited from Object.) | |
ProductionName | Gets the name of the production of the ProductionToken that the generated object was created for.
| |
Section | Gets the Section denoting the range of characters
corresponding to this token in the source text. (Inherited from Token.) | |
Tag | Gets or sets the tag integer associated with this token. The
default value is 0. | |
ToString()()()() | Creates a short string representation of the value of this
object. (Overrides Object.ToString()()()().) |
Remarks
You can create GeneratedTokens to replace ProductionTokens in the abstract syntax tree
(AST) output by the parser. You do this by returning them from code
generation methods. They will then be available to the code generation
methods for ProductionTokens higher up in the AST.