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

Method ParseToken

sdk/angelscript/source/as_parser.cpp:655–674  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

653}
654
655asCScriptNode *asCParser::ParseToken(int token)
656{
657 asCScriptNode *node = CreateNode(snUndefined);
658 if( node == 0 ) return 0;
659
660 sToken t1;
661
662 GetToken(&t1);
663 if( t1.type != token )
664 {
665 Error(ExpectedToken(asCTokenizer::GetDefinition(token)), &t1);
666 Error(InsteadFound(t1), &t1);
667 return node;
668 }
669
670 node->SetToken(&t1);
671 node->UpdateSourcePos(t1.pos, t1.length);
672
673 return node;
674}
675
676asCScriptNode *asCParser::ParseOneOf(int *tokens, int count)
677{

Callers 11

PragmaCallbackFunction · 0.45
PrintValueMethod · 0.45
GetTokenMethod · 0.45
ProcessScriptSectionMethod · 0.45
SkipStatementMethod · 0.45
ExcludeCodeMethod · 0.45
ExtractMetadataMethod · 0.45
ExtractDeclarationMethod · 0.45
test_compiler.cppFile · 0.45
TestFunction · 0.45

Calls 2

SetTokenMethod · 0.80
UpdateSourcePosMethod · 0.80

Tested by 1

TestFunction · 0.36