BNF:6: PRIMTYPE ::= 'void' | 'int' | 'int8' | 'int16' | 'int32' | 'int64' | 'uint' | 'uint8' | 'uint16' | 'uint32' | 'uint64' | 'float' | 'double' | 'bool'
| 738 | |
| 739 | // BNF:6: PRIMTYPE ::= 'void' | 'int' | 'int8' | 'int16' | 'int32' | 'int64' | 'uint' | 'uint8' | 'uint16' | 'uint32' | 'uint64' | 'float' | 'double' | 'bool' |
| 740 | asCScriptNode *asCParser::ParseRealType() |
| 741 | { |
| 742 | asCScriptNode *node = CreateNode(snDataType); |
| 743 | if( node == 0 ) return 0; |
| 744 | |
| 745 | sToken t1; |
| 746 | |
| 747 | GetToken(&t1); |
| 748 | if( !IsRealType(t1.type) ) |
| 749 | { |
| 750 | Error(TXT_EXPECTED_DATA_TYPE, &t1); |
| 751 | Error(InsteadFound(t1), &t1); |
| 752 | return node; |
| 753 | } |
| 754 | |
| 755 | node->SetToken(&t1); |
| 756 | node->UpdateSourcePos(t1.pos, t1.length); |
| 757 | |
| 758 | return node; |
| 759 | } |
| 760 | |
| 761 | // BNF:17: IDENTIFIER ::= [A-Za-z_][A-Za-z0-9_]* // single token: starts with letter or _, can include any letter and digit, same as in C++ |
| 762 | asCScriptNode *asCParser::ParseIdentifier() |
nothing calls this directly
no test coverage detected