File tree Expand file tree Collapse file tree
Parser/src/main/java/org/openzen/zenscript/parser Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -91,16 +91,6 @@ public static SemanticModule compileSyntaxToSemantic(
9191
9292 ZSPackage rootPackage = registry .collectPackages ();
9393
94- for (ParsedFile file : files ) {
95- for (ParsedDefinition definition : file .definitions ) {
96- if (definition .isExpansion ()) {
97- definition .registerCompiling (definitions , expansions , definitionCompilers .get (file ));
98- }
99- }
100- }
101-
102- definitions = sortTopologically (definitions );
103-
10494 for (ParsedFile file : files ) {
10595 ParsedFileCompiler fileCompiler = definitionCompilers .get (file );
10696 for (ParsedImport import_ : file .imports ) {
@@ -114,6 +104,16 @@ public static SemanticModule compileSyntaxToSemantic(
114104 }
115105 }
116106
107+ for (ParsedFile file : files ) {
108+ for (ParsedDefinition definition : file .definitions ) {
109+ if (definition .isExpansion ()) {
110+ definition .registerCompiling (definitions , expansions , definitionCompilers .get (file ));
111+ }
112+ }
113+ }
114+
115+ definitions = sortTopologically (definitions );
116+
117117 for (CompilingExpansion expansion : expansions ) {
118118 context .addExpansion (expansion .getCompiling ());
119119 }
You can’t perform that action at this time.
0 commit comments