MCPcopy Create free account
hub / github.com/csyonghe/Spire / CreateVarDeclForContext

Function CreateVarDeclForContext

Source/SpireCore/Parser.cpp:797–812  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

795 }
796
797 static RefPtr<VarDeclBase> CreateVarDeclForContext(
798 ContainerDecl* containerDecl )
799 {
800 if (dynamic_cast<StructSyntaxNode*>(containerDecl))
801 {
802 return new StructField();
803 }
804 else if (dynamic_cast<FunctionDeclBase*>(containerDecl))
805 {
806 return new ParameterSyntaxNode();
807 }
808 else
809 {
810 return new Variable();
811 }
812 }
813
814 static RefPtr<Decl> ParseVarDecl(
815 Parser* parser,

Callers 1

ParseVarDeclFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected