MCPcopy Create free account
hub / github.com/anjo76/angelscript / ParseRealType

Method ParseRealType

sdk/angelscript/source/as_parser.cpp:740–759  ·  view source on GitHub ↗

BNF:6: PRIMTYPE ::= 'void' | 'int' | 'int8' | 'int16' | 'int32' | 'int64' | 'uint' | 'uint8' | 'uint16' | 'uint32' | 'uint64' | 'float' | 'double' | 'bool'

Source from the content-addressed store, hash-verified

738
739// BNF:6: PRIMTYPE ::= 'void' | 'int' | 'int8' | 'int16' | 'int32' | 'int64' | 'uint' | 'uint8' | 'uint16' | 'uint32' | 'uint64' | 'float' | 'double' | 'bool'
740asCScriptNode *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++
762asCScriptNode *asCParser::ParseIdentifier()

Callers

nothing calls this directly

Calls 2

SetTokenMethod · 0.80
UpdateSourcePosMethod · 0.80

Tested by

no test coverage detected