MCPcopy Create free account
hub / github.com/MayaPosch/NymphCast / ParseToken

Method ParseToken

src/server/angelscript/angelscript/source/as_parser.cpp:599–618  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

597}
598
599asCScriptNode *asCParser::ParseToken(int token)
600{
601 asCScriptNode *node = CreateNode(snUndefined);
602 if( node == 0 ) return 0;
603
604 sToken t1;
605
606 GetToken(&t1);
607 if( t1.type != token )
608 {
609 Error(ExpectedToken(asCTokenizer::GetDefinition(token)), &t1);
610 Error(InsteadFound(t1), &t1);
611 return node;
612 }
613
614 node->SetToken(&t1);
615 node->UpdateSourcePos(t1.pos, t1.length);
616
617 return node;
618}
619
620asCScriptNode *asCParser::ParseOneOf(int *tokens, int count)
621{

Callers 9

PragmaCallbackFunction · 0.45
PrintValueMethod · 0.45
GetTokenMethod · 0.45
ProcessScriptSectionMethod · 0.45
SkipStatementMethod · 0.45
ExcludeCodeMethod · 0.45
ExtractMetadataMethod · 0.45
ExtractDeclarationMethod · 0.45

Calls 2

SetTokenMethod · 0.80
UpdateSourcePosMethod · 0.80

Tested by

no test coverage detected