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

Method ParseIdentifier

sdk/angelscript/source/as_parser.cpp:762–781  ·  view source on GitHub ↗

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++

Source from the content-addressed store, hash-verified

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()
763{
764 asCScriptNode *node = CreateNode(snIdentifier);
765 if( node == 0 ) return 0;
766
767 sToken t1;
768
769 GetToken(&t1);
770 if( t1.type != ttIdentifier )
771 {
772 Error(TXT_EXPECTED_IDENTIFIER, &t1);
773 Error(InsteadFound(t1), &t1);
774 return node;
775 }
776
777 node->SetToken(&t1);
778 node->UpdateSourcePos(t1.pos, t1.length);
779
780 return node;
781}
782
783// BNF:3: PARAMLIST ::= '(' ('void' | (TYPE TYPEMOD ('...' | IDENTIFIER? ('=' EXPR)?) (',' TYPE TYPEMOD ('...' | IDENTIFIER? ('=' EXPR)?))*))? ')'
784asCScriptNode *asCParser::ParseParameterList()

Callers

nothing calls this directly

Calls 2

SetTokenMethod · 0.80
UpdateSourcePosMethod · 0.80

Tested by

no test coverage detected