C# Class Loyc.Syntax.StdTriviaNode

A simple call node with a single literal argument.
Essentially, this is a special kind of node with both a name and a value. Since there is no syntax (or LNodeKind) for a node that has both a Name and a Value, the node pretends that it is has a single argument, Args[0], which allows this node to be printed as if it were a normal call node. For example, if this node has Name=(Symbol)"PI" and Value=3.1415, it will be printed as PI(3.1415). The TriviaValue property returns this value (in this case, (object)3.1415). Please note that the normal LNode.Value is still NoValue.Value so that if the node is printed and reparsed, it doesn't behave differently. This node type is used to represent tokens and trivia nodes with values.
Inheritance: CallNode
Exibir arquivo Open project: qwertie/ecsharp

Public Methods

Method Description
Clone ( ) : LNode
HasSimpleHead ( ) : bool
HasSimpleHeadWithoutPAttrs ( ) : bool
StdTriviaNode ( Symbol name, object value, LNode ras ) : System
StdTriviaNode ( Symbol name, object value, SourceRange range, NodeStyle style = NodeStyle.Default ) : System
WithArgs ( VList args ) : CallNode
WithAttrs ( VList attrs ) : LNode
WithName ( Symbol name ) : LNode
cov_Clone ( ) : StdTriviaNode

Method Details

Clone() public method

public Clone ( ) : LNode
return LNode

HasSimpleHead() public method

public HasSimpleHead ( ) : bool
return bool

HasSimpleHeadWithoutPAttrs() public method

public HasSimpleHeadWithoutPAttrs ( ) : bool
return bool

StdTriviaNode() public method

public StdTriviaNode ( Symbol name, object value, LNode ras ) : System
name Symbol
value object
ras LNode
return System

StdTriviaNode() public method

public StdTriviaNode ( Symbol name, object value, SourceRange range, NodeStyle style = NodeStyle.Default ) : System
name Symbol
value object
range SourceRange
style NodeStyle
return System

WithArgs() public method

public WithArgs ( VList args ) : CallNode
args VList
return CallNode

WithAttrs() public method

public WithAttrs ( VList attrs ) : LNode
attrs VList
return LNode

WithName() public method

public WithName ( Symbol name ) : LNode
name Symbol
return LNode

cov_Clone() public method

public cov_Clone ( ) : StdTriviaNode
return StdTriviaNode