-
Notifications
You must be signed in to change notification settings - Fork 26
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
380e230
commit ef82e8f
Showing
57 changed files
with
2,558 additions
and
51 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package util | ||
|
||
import me.pieterbos.mill.cpp.{CppModule => BaseCppModule, CppExecutableModule => BaseCppExecutableModule, _} | ||
import mill.T | ||
|
||
trait CppModule extends BaseCppModule { | ||
override def standard: T[options.CppStandard] = T[options.CppStandard] { options.CppStandard.Cpp20 } | ||
} | ||
|
||
trait CppExecutableModule extends BaseCppExecutableModule with CppModule |
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,30 @@ | ||
package vct.col.ast.helpers.generator | ||
|
||
import vct.col.ast.helpers.defn.Proto | ||
import vct.col.ast.structure.{AllNodesGenerator, NodeDefinition} | ||
|
||
import java.nio.file.{Files, Path} | ||
import scala.util.Using | ||
|
||
class MegaCol extends AllNodesGenerator { | ||
override def generate(out: Path, definitions: Seq[NodeDefinition]): Unit = { | ||
val families = definitions.groupBy(_.family) | ||
|
||
val genNode = new ProtoNode() | ||
val genFamily = new ProtoFamily() | ||
val genAux = new ProtoAuxTypes() | ||
|
||
val messages = | ||
definitions.map(node => genNode.message(node)) ++ | ||
families.flatMap(family => genFamily.message(family._1, family._2.map(_.name)).toSeq) ++ | ||
genAux.messages(definitions) | ||
|
||
Using(Files.newBufferedWriter(out.resolve("col.proto"))) { writer => | ||
Proto.Source( | ||
messages.flatMap(_.namedTypes.collect { case t: Proto.StandardType => t.fqName }).distinct, | ||
options = "", | ||
messages = messages, | ||
).write(writer) | ||
} | ||
} | ||
} |
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.