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

Method UpdateSourcePos

sdk/angelscript/source/as_scriptnode.cpp:107–129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105}
106
107void asCScriptNode::UpdateSourcePos(size_t pos, size_t length)
108{
109 if( pos == 0 && length == 0 ) return;
110
111 if( tokenPos == 0 && tokenLength == 0 )
112 {
113 tokenPos = pos;
114 tokenLength = length;
115 }
116 else
117 {
118 if( tokenPos > pos )
119 {
120 tokenLength = tokenPos + tokenLength - pos;
121 tokenPos = pos;
122 }
123
124 if( pos + length > tokenPos + tokenLength )
125 {
126 tokenLength = pos + length - tokenPos;
127 }
128 }
129}
130
131void asCScriptNode::AddChildLast(asCScriptNode *node)
132{

Callers 15

ParseTokenMethod · 0.80
ParseOneOfMethod · 0.80
ParseDataTypeMethod · 0.80
ParseRealTypeMethod · 0.80
ParseIdentifierMethod · 0.80
ParseParameterListMethod · 0.80
ParseListPatternMethod · 0.80
ParseCastMethod · 0.80
ParseExprValueMethod · 0.80
ParseConstantMethod · 0.80
ParseStringConstantMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected