12#ifndef PARSERESULTS_HPP
13#define PARSERESULTS_HPP
19#include "UtTextDocument.hpp"
60 void GiveProxy(std::unique_ptr<WsfPProxy> aProxy, std::unique_ptr<ProxyHash> aProxyHashPtr);
160 std::map<UtTextDocument*, WsfParseSourceInclude*>& aFirstIncludes);
163 bool GetRangeNodes(
const UtTextDocumentRange& aRange, std::vector<WsfParseNode*>& aNodes);
166 const UtTextRange& aLocation,
176 void FindDefinitions(
const std::string& aName,
const std::string& aDefinitionKind, std::vector<WsfParseNode*>& aNodes);
178 void FindReferences(
const std::string& aName,
const std::string& aDefinitionKind, std::vector<WsfParseNode*>& aNodes);
182 std::vector<WsfParseNode*>& aNodes,
183 bool aAllowNested =
false);
185 void FindNamedNodes(
const std::string& aCategory,
const std::string& aName, std::vector<WsfParseNode*>& aNodes);
192 void FindNames(
const std::string& aNameType, std::vector<std::string>& aNameList);
287 if (aQuery.size() >= 2 && aTest.size() >= 2)
289 if (aQuery[1] == aTest[1])
291 if (aQuery[0] ==
"platform_part")
302 return aQuery[0] == aTest[0];
#define VI_EXPORT
Definition ViExport.hpp:38
std::map< WsfPProxyPath, WsfPProxyPathSet > WsfPProxyPathMap
Definition WsfPProxyPath.hpp:180
std::vector< UtStringRef > WsfParseTypePath
Definition WsfParseTypePath.hpp:21
Definition WsfPProxyIndex.hpp:96
Definition WsfPProxyNode.hpp:60
static WsfPProxyNode FromProxy(WsfPProxy *aProxy)
Definition WsfPProxyNode.cpp:69
Represents a path or unique key to a value in the proxy.
Definition WsfPProxyPath.hpp:64
Definition WsfPProxyStructValue.hpp:23
Definition WsfPProxy.hpp:32
Definition WsfParser.hpp:270
Definition WsfParseIndex.hpp:40
Definition WsfParseNode.hpp:61
Definition WsfParseRule.hpp:131
Definition WsfParseSourceInclude.hpp:31
Definition WsfParseType.hpp:40
Definition WsfParser.hpp:36
UtTextDocumentRange FindDefinitionLocation(const WsfPProxyPath &aPath)
Definition ParseResults.cpp:1489
void SwapProxy(ParseResultsProxyData &aOtherParseResults, bool aSwapProxyPointer)
Definition ParseResults.cpp:1414
void FindProxySourcePaths(const WsfPProxyPath &aPath, std::vector< WsfPProxyPath > &aSources)
Definition ParseResults.cpp:1436
bool isProxyDataOld() const
Definition ParseResults.hpp:106
void FindModificationLocations(const WsfPProxyPath &aPath, std::vector< UtTextDocumentRange > &aLocations)
Definition ParseResults.cpp:1517
void FindDerivedTypes(const WsfPProxyPath &aTypePath, std::vector< WsfPProxyPath > &aDerivedTypePaths)
Definition ParseResults.cpp:1556
void FindDefinitionStartLocations(const WsfPProxyPath &aPath, std::vector< UtTextDocumentRange > &aLocations)
Definition ParseResults.cpp:1500
ParseResultsProxyData(const ParseResultsProxyData &)=delete
virtual ~ParseResultsProxyData()=default
ParseResultsProxyData & operator=(ParseResultsProxyData &&)=default
void GiveProxy(std::unique_ptr< WsfPProxy > aProxy, std::unique_ptr< ProxyHash > aProxyHashPtr)
Definition ParseResults.cpp:1388
ProxyHash * GetProxyHash()
Definition ParseResults.hpp:103
WsfPProxyStructValue ProxyRoot() const
Definition ParseResults.hpp:101
ParseResultsProxyData()
Definition ParseResults.hpp:45
std::unique_ptr< ProxyHash > mProxyHashPtr
Definition ParseResults.hpp:109
ParseResultsProxyData & operator=(const ParseResultsProxyData &)=delete
void FindDefinitionStartLocationsExtended(const WsfPProxyPath &aPath, std::vector< UtTextDocumentRange > &aLocations)
Definition ParseResults.cpp:1545
WsfPProxyIndex * ProxyIndex()
Definition ParseResults.hpp:104
std::unique_ptr< WsfPProxy > mProxy
Definition ParseResults.hpp:110
WsfPProxyNode ProxyRootNode() const
Definition ParseResults.hpp:100
const std::shared_ptr< WsfPProxyRegistry > & ProxyRegistry()
Definition ParseResults.hpp:102
WsfPProxy * Proxy() const
Definition ParseResults.hpp:99
WsfPProxyPathMap * ProxyPathMap()
Definition ParseResults.hpp:105
void FindModificationLocationsExtended(const WsfPProxyPath &aPath, std::vector< UtTextDocumentRange > &aLocations)
Definition ParseResults.cpp:1534
ParseResultsProxyData(ParseResultsProxyData &&)=default
Project * mProjectPtr
Definition ParseResults.hpp:133
bool IncludesFile(TextSource *aSourcePtr) const
Definition ParseResults.cpp:1347
bool FindBestRelativePath(UtPath aFullPath, std::string &aRelativeIncludePath)
Definition ParseResults.cpp:1352
void TakeResults(ParseResults &aResults)
Copies a minimal subset of results from aResults.
Definition ParseResults.cpp:1320
ParseIncludes mFirstIncludes
Definition ParseResults.hpp:137
WsfScriptTypes * mScriptTypesPtr
Definition ParseResults.hpp:141
ParseIncludePaths mIncludePaths
Definition ParseResults.hpp:138
ParseResultsTiny(Project *aProjectPtr)
Definition ParseResults.cpp:1301
WsfScriptData * mScriptDataPtr
Definition ParseResults.hpp:140
void FreeScriptTypes()
Definition ParseResults.cpp:1372
long long mSequenceNumber
Definition ParseResults.hpp:132
Provides access to the results of parsing the WSF inputs.
Definition ParseResults.hpp:147
bool TypeKeyMatches(const WsfParseTypePath &aQuery, const WsfParseTypePath &aTest)
Definition ParseResults.hpp:285
void FindDefinitions(const std::string &aName, const std::string &aDefinitionKind, std::vector< WsfParseNode * > &aNodes)
Definition ParseResults.cpp:181
WsfParseNode * FindTypeDefinitionNode(const TypeInformation &aType)
Searches for the parse node which defined aType.
Definition ParseResults.cpp:1192
FileNotificationMap mFileNotifications
Definition ParseResults.hpp:339
bool FindTypeInfo(TypeInformation &aInformation)
Fills aInformation given the type key. Returns 'true' if the type information was found successfully.
Definition ParseResults.cpp:829
std::set< WsfParseTypePath > mTypeNames
Definition ParseResults.hpp:340
WsfParseNode * mLastNodePtr
Definition ParseResults.hpp:328
void IndexNames()
Definition ParseResults.cpp:740
std::map< UtTextDocument *, FileNotificationList > FileNotificationMap
Definition ParseResults.hpp:338
void Clear()
Definition ParseResults.cpp:56
WsfParseNode * lastNode() const
Definition ParseResults.hpp:312
WsfParseNode * parseTree() const
Definition ParseResults.hpp:311
bool mTypeNamesIndexed
Definition ParseResults.hpp:341
void FindIncludes(TextSource *aSourcePtr, std::vector< UtTextDocumentRange > &aIncludes)
Definition ParseResults.cpp:388
bool FindBaseType(const TypeInformation &aType, TypeInformation &aBaseType)
Searches for the type information of aType's base type.
Definition ParseResults.cpp:1039
void FindReferences(const std::string &aName, const std::string &aDefinitionKind, std::vector< WsfParseNode * > &aNodes)
Definition ParseResults.cpp:205
std::vector< WsfParseNode * > FindTypeReferenceNodes(const TypeInformation &aType)
Definition ParseResults.cpp:1146
void FindSubcommands(WsfParseNode *aNodePtr, std::vector< std::string > &aCommands)
bool TypeInformationFromNode(WsfParseNode *aNodePtr, TypeInformation &aInformation)
Definition ParseResults.cpp:963
WsfParseNode * mParseTreePtr
Definition ParseResults.hpp:324
void FindNamedNodes(const std::string &aCategory, const std::string &aName, std::vector< WsfParseNode * > &aNodes)
Definition ParseResults.cpp:290
bool FindUserTypeDocumentation(TypeInformation &aType, std::string &aDocumentation)
Definition ParseResults.cpp:915
WsfParseNode * FindLastParseNode(const UtTextDocumentRange &aPosition)
Definition ParseResults.cpp:142
WsfParser * mParserPtr
Definition ParseResults.hpp:320
std::vector< WsfParseError * > mErrors
Definition ParseResults.hpp:322
WsfParseNode * FindBlock(WsfParseNode *aNodePtr)
Definition ParseResults.cpp:152
std::vector< FileNotification > FileNotificationList
Definition ParseResults.hpp:239
static WsfPProxyNode FindProxyReference(WsfPProxyNode aContext, WsfParseTypePath aPath)
Definition ParseResults.cpp:1248
bool FindIncludeAtPoint(UtTextDocument *aSourcePtr, const UtTextRange &aLocation, WsfParseSourceInclude *&aSourceIncludePtr, int &aEntryIndex, TextSource *&aIncludeSourcePtr)
Definition ParseResults.cpp:100
void FindSubcommandsP(WsfParseRule *aReaderPtr, std::vector< std::string > &aCommands)
WsfParseType * FindCurrentType(WsfParseNode *aNodePtr)
Return the type lookup for the type located at aNodePtr.
Definition ParseResults.cpp:759
void AssignResults(Project *aProjectPtr, WsfParser *aParserPtr, const WsfParseSourceInclude *aRootInclude, WsfParseNode *aParseTreePtr, WsfParseNode *aLastNodePtr, std::map< UtTextDocument *, WsfParseSourceInclude * > &aFirstIncludes)
Definition ParseResults.cpp:76
WsfParseIndex * GetParseIndex()
Definition ParseResults.cpp:1291
WsfParser * parser() const
Definition ParseResults.hpp:309
friend class ParseWorker
Definition ParseResults.hpp:149
void GetBaseTypes(const WsfParseTypePath &aKind, std::vector< std::string > &aBaseTypeNames, bool aIncludeUserTypes=true)
Definition ParseResults.cpp:308
const WsfParseSourceInclude * mRootInclude
Definition ParseResults.hpp:330
void FindNames(const std::string &aNameType, std::vector< std::string > &aNameList)
Definition ParseResults.cpp:359
FileNotificationList * GetFileNotifications(TextSource *aSourcePtr)
Definition ParseResults.cpp:432
WsfParseNode * FindCreateTypeNode(const TypeInformation &aType)
Searches for the parse node that created the specified type.
Definition ParseResults.cpp:1067
WsfParseSourceInclude * FindSourceData(UtTextDocument *aSourcePtr)
Definition ParseResults.cpp:128
std::vector< WsfParseNode * > mFileTransitionNodes
Definition ParseResults.hpp:317
WsfPProxyPath FindProxyPathFromLocation(const UtTextDocumentRange &aLocation, int &aEntryTypeRef)
Definition ParseResults.cpp:1223
ParseResults(Project *aProjectPtr)
Definition ParseResults.cpp:36
void FindReferencedFiles(std::vector< WsfParseNode * > &aFileReferenceNodes)
Definition ParseResults.cpp:419
bool GetRangeNodes(const UtTextDocumentRange &aRange, std::vector< WsfParseNode * > &aNodes)
Definition ParseResults.cpp:646
const std::vector< WsfParseError * > & errors() const
Definition ParseResults.hpp:310
FileNotificationType
Definition ParseResults.hpp:206
@ cWARNING_BIT
Definition ParseResults.hpp:210
@ cREFERENCE_KIND
Definition ParseResults.hpp:221
@ cSYNTAX_ERROR_KIND
Definition ParseResults.hpp:223
@ cERROR_BIT
Definition ParseResults.hpp:208
@ cINFORMATION_BIT
Definition ParseResults.hpp:213
@ cTYPE_KIND
Definition ParseResults.hpp:217
@ cINCLUDE_KIND
Definition ParseResults.hpp:219
@ cKIND_MASK
Definition ParseResults.hpp:215
std::vector< UtStringRef > mPlatformPartKinds
Definition ParseResults.hpp:332
void FindDefinitionsOfType(const WsfParseTypePath &aPath, std::vector< WsfParseNode * > &aNodes, bool aAllowNested=false)
Definition ParseResults.cpp:255
bool TypeInformationFromPosition(const UtTextDocumentLocation &aLocation, TypeInformation &aInformation)
Definition ParseResults.cpp:818
const WsfParseSourceInclude * rootInclude() const
Definition ParseResults.hpp:313
FileNotification GetNotification(const UtTextDocumentLocation &aLocation)
Definition ParseResults.cpp:620
Definition ParseWorker.hpp:50
A WSF 'project'. Manages WSF sources files in a WSF project.
Definition Project.hpp:66
Definition ProxyMerge.hpp:56
Definition TextSource.hpp:48
Definition WsfScriptData.hpp:177
Definition WsfScriptData.hpp:213
std::map< UtTextDocument *, WsfParseSourceInclude * > ParseIncludes
Definition ParseResults.hpp:113
std::vector< UtStringRef > ParseIncludePaths
Definition ParseResults.hpp:114
Definition ParseResults.hpp:227
FileNotification(const UtTextRange &aRange, unsigned int aNotificationType)
Definition ParseResults.hpp:229
UtTextRange mRange
Definition ParseResults.hpp:236
unsigned int mNotificationType
Definition ParseResults.hpp:237
int GetNotificationKind() const
Definition ParseResults.hpp:235
bool operator<(FileNotification &aRhs) const
Definition ParseResults.hpp:228
bool IsValid() const
Definition ParseResults.hpp:234