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 | accept (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.
|
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
";"
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)).