This repository has been archived by the owner on Oct 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b218f46
commit 0f2d961
Showing
17 changed files
with
194 additions
and
207 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
namespace Moth.AST.Node; | ||
|
||
public class ConstTemplateParameterNode : TemplateParameterNode | ||
{ | ||
public TypeRefNode TypeRef { get; set; } | ||
|
||
public ConstTemplateParameterNode(string name, TypeRefNode typeRef) : base(name) => TypeRef = typeRef; | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,15 @@ | ||
namespace Moth.AST.Node; | ||
|
||
public class ClassNode : DefinitionNode | ||
public class StructNode : DefinitionNode | ||
{ | ||
public string Name { get; set; } | ||
public PrivacyType Privacy { get; set; } | ||
public ScopeNode? Scope { get; set; } | ||
public bool IsStruct { get; set; } | ||
|
||
public ClassNode(string name, PrivacyType privacy, ScopeNode? scope, bool isStruct) : base(new List<AttributeNode>()) | ||
public StructNode(string name, PrivacyType privacy, ScopeNode? scope) : base(new List<AttributeNode>()) | ||
{ | ||
Name = name; | ||
Privacy = privacy; | ||
Scope = scope; | ||
IsStruct = isStruct; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
namespace Moth.AST.Node; | ||
|
||
public class TemplateNode : StructNode | ||
{ | ||
public List<TemplateParameterNode> Params { get; set; } | ||
|
||
public TemplateNode(string name, PrivacyType privacy, List<TemplateParameterNode> @params, ScopeNode scope) | ||
: base(name, privacy, scope) => Params = @params; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
namespace Moth.AST.Node; | ||
|
||
public class TemplateParameterNode : ASTNode | ||
{ | ||
public string Name { get; set; } | ||
|
||
public TemplateParameterNode(string name) => Name = name; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.