Update namespace

This commit is contained in:
2025-10-23 15:13:10 +09:00
parent 28c386b0bb
commit 9dc4f63e40
27 changed files with 48 additions and 43 deletions

View File

@@ -1,4 +1,4 @@
namespace Ghost.Shader.Compiler.Parser;
namespace Ghost.SDL.Compiler.Parser;
internal class DefinesBlock : IBlockParser<List<Token>, List<string>>
{

View File

@@ -1,4 +1,4 @@
namespace Ghost.Shader.Compiler.Parser;
namespace Ghost.SDL.Compiler.Parser;
internal interface IBlockParser<T, U>
{

View File

@@ -1,4 +1,4 @@
namespace Ghost.Shader.Compiler.Parser;
namespace Ghost.SDL.Compiler.Parser;
internal class IncludesBlock : IBlockParser<List<Token>, List<string>>
{

View File

@@ -1,6 +1,6 @@
using Ghost.Core.Graphics;
namespace Ghost.Shader.Compiler.Parser;
namespace Ghost.SDL.Compiler.Parser;
internal class KeywordsBlock : IBlockParser<List<FunctionCallDeclaration>, List<KeywordsGroup>>
{

View File

@@ -1,4 +1,4 @@
namespace Ghost.Shader.Compiler.Parser;
namespace Ghost.SDL.Compiler.Parser;
internal static class ParseUtility
{

View File

@@ -1,6 +1,6 @@
using Ghost.Core.Graphics;
namespace Ghost.Shader.Compiler.Parser;
namespace Ghost.SDL.Compiler.Parser;
// TODO: Add pass template support.
// Pass templates let user to inject their own custom code into the generated HLSL code.

View File

@@ -1,6 +1,6 @@
using Ghost.Core.Graphics;
namespace Ghost.Shader.Compiler.Parser;
namespace Ghost.SDL.Compiler.Parser;
internal class PipelineBlock : IBlockParser<PipelineSyntax, PipelineSemantic>
{

View File

@@ -2,7 +2,7 @@ using Ghost.Core.Graphics;
using Misaki.HighPerformance.Mathematics;
using System.Globalization;
namespace Ghost.Shader.Compiler.Parser;
namespace Ghost.SDL.Compiler.Parser;
internal class PropertiesBlock : IBlockParser<PropertiesSyntax, List<PropertySemantic>>
{

View File

@@ -1,15 +1,15 @@
namespace Ghost.Shader.Compiler.Parser;
namespace Ghost.SDL.Compiler.Parser;
internal class ShaderBlock : IBlockParser<ShaderSyntax, ShaderSemantics>
internal class ShaderBlock : IBlockParser<SDLSyntax, SDLSemantics>
{
public static bool ShouldEnter(Token token)
{
return token.Match(TokenType.Keyword, TokenLexicon.KnownKeywords.SHADER);
}
public static ShaderSyntax Parse(TokenStreamSlice stream)
public static SDLSyntax Parse(TokenStreamSlice stream)
{
var shader = new ShaderSyntax();
var shader = new SDLSyntax();
stream.Expect(TokenType.Keyword);
shader.name = stream.Expect(TokenType.StringLiteral);
@@ -49,14 +49,14 @@ internal class ShaderBlock : IBlockParser<ShaderSyntax, ShaderSemantics>
return shader;
}
public static ShaderSemantics? SemanticAnalysis(ShaderSyntax? syntax, List<SDLError> errors)
public static SDLSemantics? SemanticAnalysis(SDLSyntax? syntax, List<SDLError> errors)
{
if (syntax == null)
{
return null;
}
var shaderModel = new ShaderSemantics
var shaderModel = new SDLSemantics
{
name = syntax.name.lexeme,
properties = PropertiesBlock.SemanticAnalysis(syntax.properties, errors),