aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/config/SJSPlatform.scala
diff options
context:
space:
mode:
authorSébastien Doeraene <sjrdoeraene@gmail.com>2016-02-29 12:48:06 +0100
committerSébastien Doeraene <sjrdoeraene@gmail.com>2016-03-01 15:47:56 +0100
commit18505cb2061235dba1b064b9379164e2a48254a6 (patch)
treea207c35b7610f2ecfa1b3b2d76c8d0041f596fe8 /src/dotty/tools/dotc/config/SJSPlatform.scala
parentcd4004a82d9713bbb0b120aba83b3ed8fc9f1372 (diff)
downloaddotty-18505cb2061235dba1b064b9379164e2a48254a6.tar.gz
dotty-18505cb2061235dba1b064b9379164e2a48254a6.tar.bz2
dotty-18505cb2061235dba1b064b9379164e2a48254a6.zip
Store the JSDefinitions in a custom platform SJSPlatform.
This required the ability to instantiate a different `Platform` depending on settings, which, in turn, required to defer the initialization of `ContextBase.platform`.
Diffstat (limited to 'src/dotty/tools/dotc/config/SJSPlatform.scala')
-rw-r--r--src/dotty/tools/dotc/config/SJSPlatform.scala13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/config/SJSPlatform.scala b/src/dotty/tools/dotc/config/SJSPlatform.scala
new file mode 100644
index 000000000..fec9c25a1
--- /dev/null
+++ b/src/dotty/tools/dotc/config/SJSPlatform.scala
@@ -0,0 +1,13 @@
+package dotty.tools.dotc.config
+
+import dotty.tools.dotc.core._
+import Contexts._
+
+import dotty.tools.backend.sjs.JSDefinitions
+
+class SJSPlatform()(implicit ctx: Context) extends JavaPlatform {
+
+ /** Scala.js-specific definitions. */
+ val jsDefinitions: JSDefinitions = new JSDefinitions()
+
+}