CsOperator Class Reference
Operator AST node.
More...
List of all members.
Public Member Functions |
| CsOperator () |
override void | replace (CsNode old_node, CsNode new_node) |
| Replace CsNode fields.
|
override CsNode | clone (clone_options options) |
| Clone AST node.
|
override void | addTokensRecursive (CsTokenCollector tokenCollector) |
| Recursively collect token indexes in source code order.
|
override void | addTokens (CsTokenCollector tokenCollector) |
| Collect token indexes associated with this AST node.
|
override void | visit (ICsAstVisitor visitor) |
| ICsAstVisitor support.
|
override void | callback (ICsAstCallback visitor) |
| ICsAstCallback support.
|
override bool | isMethodNode () |
| Returns true if node is method.
|
Public Attributes |
CsAttributes | attributes |
| Attributes.
|
CsModifiers | modifiers |
| Modifiers.
|
CsTypeRef | type |
| Return type.
|
CsTokenType | operation |
| Operator (one of: + (tkPLUS), - (tkMINUS), * (tkSTAR), / (tkDIV), % (tkMOD), & (tkBITAND), | (tkBITOR), ^ (tkXOR), << (tkSHIFT_LEFT), >> (tkSHIFT_RIGHT), == (tkEQUAL), != (tkNOT_EQ), < (tkLESS), > (tkRIGHT), <= (tkLESS_OR_EQUAL), >= (tkGREATER_OR_EQUAL)).
|
CsFormalParameter | parameter1 |
| First parameter.
|
CsFormalParameter | parameter2 |
| Second parameter.
|
CsBlock | definition |
| Method definition.
|
CsEntityMethod | entity |
| Operator method entity.
|
int | operator_token |
int | operation_token |
int | operation_token2 |
int | lparen_token |
int | comma_token |
int | rparen_token |
int | semicolon_token |
DcData | dc |
| Documentation comments.
|
Detailed Description
Operator AST node.
EBNF grammar:
operator-declaration:
(attributes)? operator-modifiers operator-declarator operator-body
operator-declarator:
unary-operator-declarator
binary-operator-declarator
conversion-operator-declarator
unary-operator-declarator:
type "operator" overloadable-unary-operator "(" type identifier ")"
overloadable-unary-operator: one of
"+" "-" "!" "~" "++" "--" "true" "false"
binary-operator-declarator:
type "operator" overloadable-binary-operator "(" type identifier "," type identifier ")"
overloadable-binary-operator: one of
"+" "-" "*" "/" "%" "&" "|" "^" "<<" ">>" "==" "!=" ">" "<" ">=" "<="
operator-body:
block
";"
Constructor & Destructor Documentation
Member Function Documentation
Collect token indexes associated with this AST node.
Implements CsNode.
Recursively collect token indexes in source code order.
Implements CsNode.
Clone AST node.
Implements CsNode.
override bool isMethodNode |
( |
|
) |
[virtual] |
Returns true if node is method.
Reimplemented from CsNode.
override void replace |
( |
CsNode |
old_node, |
|
|
CsNode |
new_node | |
|
) |
| | [virtual] |
Member Data Documentation
Operator (one of: + (tkPLUS), - (tkMINUS), * (tkSTAR), / (tkDIV), % (tkMOD), & (tkBITAND), | (tkBITOR), ^ (tkXOR), << (tkSHIFT_LEFT), >> (tkSHIFT_RIGHT), == (tkEQUAL), != (tkNOT_EQ), < (tkLESS), > (tkRIGHT), <= (tkLESS_OR_EQUAL), >= (tkGREATER_OR_EQUAL)).