diff options
| author | Tim Foley <tfoleyNV@users.noreply.github.com> | 2017-08-07 15:44:00 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-08-07 15:44:00 -0700 |
| commit | 9ad2b40b79907c847451891ce2716fcbcdd2e916 (patch) | |
| tree | e492a82b13334955c1c56f6e3f9d25e8165de82c /source/slang/syntax.h | |
| parent | ca8eea98c89c632dd7b5a6a8b84d379d1e9e59cf (diff) | |
| parent | 7b54f43fb1b123f451460edb0add218a0428fe95 (diff) | |
Merge pull request #153 from tfoleyNV/remove-globals
Remove uses of global variables
Diffstat (limited to 'source/slang/syntax.h')
| -rw-r--r-- | source/slang/syntax.h | 38 |
1 files changed, 35 insertions, 3 deletions
diff --git a/source/slang/syntax.h b/source/slang/syntax.h index 3f1c47fb9..56b5624b5 100644 --- a/source/slang/syntax.h +++ b/source/slang/syntax.h @@ -11,6 +11,7 @@ namespace Slang { + class Session; class Substitutions; class SyntaxVisitor; class FunctionSyntaxNode; @@ -1074,16 +1075,19 @@ namespace Slang // // TODO(tfoley): These should really belong to the compilation context! // - void RegisterBuiltinDecl( + void registerBuiltinDecl( + Session* session, RefPtr<Decl> decl, RefPtr<BuiltinTypeModifier> modifier); - void RegisterMagicDecl( + void registerMagicDecl( + Session* session, RefPtr<Decl> decl, RefPtr<MagicTypeModifier> modifier); // Look up a magic declaration by its name RefPtr<Decl> findMagicDecl( - String const& name); + Session* session, + String const& name); // Create an instance of a syntax class by name SyntaxNodeBase* createInstanceOfSyntaxClassByName( @@ -1171,6 +1175,34 @@ namespace Slang return declRef.getDecl()->inner.Ptr(); } + + // + + RefPtr<ArrayExpressionType> getArrayType( + ExpressionType* elementType, + IntVal* elementCount); + + RefPtr<ArrayExpressionType> getArrayType( + ExpressionType* elementType); + + RefPtr<NamedExpressionType> getNamedType( + Session* session, + DeclRef<TypeDefDecl> const& declRef); + + RefPtr<TypeType> getTypeType( + ExpressionType* type); + + RefPtr<FuncType> getFuncType( + Session* session, + DeclRef<CallableDecl> const& declRef); + + RefPtr<GenericDeclRefType> getGenericDeclRefType( + Session* session, + DeclRef<GenericDecl> const& declRef); + + RefPtr<SamplerStateType> getSamplerStateType( + Session* session); + } // namespace Slang #endif
\ No newline at end of file |
