-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactoring and simplification (#346)
- Loading branch information
1 parent
be8e903
commit cdc5d8f
Showing
65 changed files
with
1,043 additions
and
545 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 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
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
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,20 @@ | ||
import "global/GlobalResourceManager"; | ||
|
||
type ICompilerPass interface { | ||
p changeToScope(Scope*, const ScopeType&); | ||
p changeToScope(const String&, const ScopeType&); | ||
p changeToParentScope(ScopeType); | ||
} | ||
|
||
type CompilerPass struct : ICompilerPass { | ||
GlobalResourceManager& globalResourceManager | ||
const CliOptions& cliOptions | ||
SourceFile* sourceFile | ||
Scope* rootScope | ||
unsigned long manIdx = 0 | ||
Scope* currentScope | ||
} | ||
|
||
p CompilerPass.ctor(GlobalResourceManager& resourceManager, SourceFile* sourceFile) { | ||
|
||
} |
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,14 @@ | ||
import "../CompilerPass"; | ||
import "../SourceFile"; | ||
import "SpiceVisitor"; | ||
|
||
type ASTBuilder struct : ICompilerPass, SpiceVisitor { | ||
CompilerPass compilerPass | ||
const FilePath& filePath | ||
Stack<ASTNode*> parentStack | ||
} | ||
|
||
p ASTBuilder.ctor(GlobalResourceManager& resourceManager, SourceFile* sourceFile = nil<SourceFile*>) { | ||
this.compilerPass = CompilerPass(resourceManager, sourceFile); | ||
this.resourceManager = resourceManager; | ||
} |
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.