Public Member Functions |
| | CsOperator () |
| | CsOperator (LineInfo line_info) |
| virtual | ~CsOperator () |
| virtual void | build_entities (CsDisplay &display) |
| | Build Entities - pass 2 (for internal purpose only).
|
| virtual void | type_lookup (CsDisplay &display) |
| | Type Lookup - pass 3 (for internal purpose only).
|
| virtual void | member_lookup (CsDisplay &display) |
| | Member Lookup - pass 4 (for internal purpose only).
|
| virtual void | clearEntities () |
| | Clear all entity references (for internal purpose only).
|
| virtual void | addTokensRecursive (CsTokenCollector &tokenCollector) |
| | Recursively collect token indexes in source code order.
|
| virtual void | addTokens (CsTokenCollector &tokenCollector) |
| | Collect token indexes associated with this AST node.
|
| virtual void | addEntityDefinitions (CsEntityCollector &tokenCollector) |
| | Collect entities defined in this AST node.
|
| virtual void | addEntityReferences (CsEntityCollector &tokenCollector) |
| | Collect entity references.
|
| virtual void | visit (CsAstVisitor *visitor) |
| | CsAstVisitor support.
|
| virtual void | callback (CsAstCallback *visitor) |
| | CsAstCallback support.
|
| virtual cs_pass | getNodePassType () |
| | Returns node pass type.
|
| virtual cs_entity_modification | getEntityModification () |
| | Returns entity modification.
|
| virtual void | iInternalRemoveEntities (cs_pass pass) |
Static Public Member Functions |
| static WPHashString | evalOperatorMethodName (CsTokenType operation, bool parameters2, CsDisplay &display) |
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.
|
| CsTokenIndex | operator_token |
| CsTokenIndex | operation_token |
| CsTokenIndex | operation_token2 |
| CsTokenIndex | lparen_token |
| CsTokenIndex | comma_token |
| CsTokenIndex | rparen_token |
| CsTokenIndex | 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)).