aboutsummaryrefslogtreecommitdiff
path: root/compiler/sjs/tools/dotc
diff options
context:
space:
mode:
authorFelix Mulder <felix.mulder@gmail.com>2016-11-03 16:20:28 +0100
committerGuillaume Martres <smarter@ubuntu.com>2016-11-22 01:35:07 +0100
commit94a8177f208418682b86934eb3f0b8edab99b1f0 (patch)
treeef2018006aee9af3f3afb9a92037ec605d835cd1 /compiler/sjs/tools/dotc
parentfcdb1c984c4b32c0c1b13337d9bd50a3883cb3b3 (diff)
downloaddotty-94a8177f208418682b86934eb3f0b8edab99b1f0.tar.gz
dotty-94a8177f208418682b86934eb3f0b8edab99b1f0.tar.bz2
dotty-94a8177f208418682b86934eb3f0b8edab99b1f0.zip
Move `dottydoc` -> `doc-tool`
Diffstat (limited to 'compiler/sjs/tools/dotc')
-rw-r--r--compiler/sjs/tools/dotc/config/SJSPlatform.scala18
1 files changed, 18 insertions, 0 deletions
diff --git a/compiler/sjs/tools/dotc/config/SJSPlatform.scala b/compiler/sjs/tools/dotc/config/SJSPlatform.scala
new file mode 100644
index 000000000..3ec8049ae
--- /dev/null
+++ b/compiler/sjs/tools/dotc/config/SJSPlatform.scala
@@ -0,0 +1,18 @@
+package dotty.tools.dotc.config
+
+import dotty.tools.dotc.core._
+import Contexts._
+import Symbols._
+
+import dotty.tools.backend.sjs.JSDefinitions
+
+class SJSPlatform()(implicit ctx: Context) extends JavaPlatform {
+
+ /** Scala.js-specific definitions. */
+ val jsDefinitions: JSDefinitions = new JSDefinitions()
+
+ /** Is the SAMType `cls` also a SAM under the rules of the Scala.js back-end? */
+ override def isSam(cls: ClassSymbol)(implicit ctx: Context): Boolean =
+ defn.isFunctionClass(cls) || jsDefinitions.isJSFunctionClass(cls)
+
+}