CsOperator Struct ReferenceOperator AST node.
More...
Inheritance diagram for CsOperator:
List of all members.
|
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 | addTokensRecursive (CsTokenCollector &tokenCollector) |
| Recusively 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 | clearEntities () |
| Clear all entity references (for internal purpose only).
|
Public Attributes |
CS_GET_NODES 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 | lparen_token |
CsTokenIndex | comma_token |
CsTokenIndex | rparen_token |
CsTokenIndex | semicolon_token |
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
CsOperator::CsOperator |
( |
|
) |
[inline] |
|
CsOperator::CsOperator |
( |
LineInfo |
line_info |
) |
[inline, explicit] |
|
virtual CsOperator::~CsOperator |
( |
|
) |
[inline, virtual] |
|
Member Function Documentation
virtual void CsOperator::addEntityDefinitions |
( |
CsEntityCollector & |
tokenCollector |
) |
[virtual] |
|
|
Collect entities defined in this AST node.
Implements CsNode. |
virtual void CsOperator::addEntityReferences |
( |
CsEntityCollector & |
tokenCollector |
) |
[virtual] |
|
|
Collect entity references.
Implements CsNode. |
virtual void CsOperator::addTokens |
( |
CsTokenCollector & |
tokenCollector |
) |
[virtual] |
|
|
Collect token indexes associated with this AST node.
Implements CsNode. |
virtual void CsOperator::addTokensRecursive |
( |
CsTokenCollector & |
tokenCollector |
) |
[virtual] |
|
|
Recusively collect token indexes in source code order.
Implements CsNode. |
virtual void CsOperator::build_entities |
( |
CsDisplay & |
display |
) |
[virtual] |
|
|
Build Entities - pass 2 (for internal purpose only).
Implements CsNode. |
virtual void CsOperator::clearEntities |
( |
|
) |
[virtual] |
|
|
Clear all entity references (for internal purpose only).
Implements CsNode. |
virtual void CsOperator::member_lookup |
( |
CsDisplay & |
display |
) |
[virtual] |
|
|
Member Lookup - pass 4 (for internal purpose only).
Implements CsNode. |
virtual void CsOperator::type_lookup |
( |
CsDisplay & |
display |
) |
[virtual] |
|
|
Type Lookup - pass 3 (for internal purpose only).
Implements CsNode. |
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)).
|
|
Return type.
Reimplemented from CsNode. |
|