-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Hear! hear! a new minor version is born! The $:compile command hath
come, and thou shalt try this code: $:require("gfx $gfx:clrscn( $gfx:test( Also, this is # 11 ^ 2.
- Loading branch information
1 parent
72d40b5
commit 5eba25b
Showing
11 changed files
with
119 additions
and
24 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,3 +50,10 @@ amw/ | |
|
||
# swear data | ||
git-pissed.html | ||
|
||
# Ensime stuff | ||
.ensime-2.11 | ||
.ensime_lucene/ | ||
|
||
# Annoying backup files | ||
*~ |
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 |
---|---|---|
@@ -1,13 +1,15 @@ | ||
name := "Bag" | ||
|
||
version := "0.6.1" | ||
version := "0.6.2" | ||
|
||
scalaVersion := "2.11.0" | ||
scalaVersion := "2.11.1" | ||
|
||
libraryDependencies ++= Seq( | ||
"org.scalatest" %% "scalatest" % "2.0", | ||
"org.scala-lang" % "scala-swing" % "2.11.0", | ||
"org.scalatest" % "scalatest_2.10" % "2.1.3" % "test", | ||
"org.scala-lang.modules" %% "scala-swing" % "1.0.1", | ||
"org.scala-lang.modules" %% "scala-parser-combinators" % "1.0.1" | ||
) | ||
|
||
lazy val root = project.in( file(".") ).dependsOn( assemblyPlugin ) | ||
|
||
lazy val assemblyPlugin = uri("git://github.com/ensime/ensime-sbt-cmd") |
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,28 @@ | ||
package cmdreader.std | ||
|
||
import types._ | ||
import cmdreader._ | ||
import java.io._ | ||
import util._ | ||
import parse.ast._ | ||
import gui.Main | ||
import rwvar._ | ||
|
||
class Compile extends Command { | ||
def getName = "compile" | ||
def isValidArg0(n: Int) = n == 1 | ||
def apply(args: Array[Type]) = { | ||
val fname = args(0).toString | ||
val a = PathNameConverter.aToOs(fname)._1 | ||
val addr = "amw/" + a.substring(0, a.length - 8) + "bag" | ||
val srcAddr = new File(addr) | ||
val srcReader = new FileReader(srcAddr) | ||
// Can't get a fuckin' string from a file easily, ze | ||
val srcPart = StringRetriever.getStringFrom(srcReader) | ||
val src = s"\u03BB\n$srcPart\nEnd\u03BB" | ||
val f = WholeParser.parse(src, Main.p) | ||
VariableWriter.writeValToVarfile(VariableReader.readData(f.drop(6), 7, fname), | ||
addr.substring(0, addr.length - 3) + "variable") | ||
new TVoid | ||
} | ||
} |
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,21 @@ | ||
package util | ||
|
||
import java.io._ | ||
import scala.collection.mutable.StringBuilder | ||
|
||
/* | ||
* Retrieves a string from a Reader. | ||
* @author bb94 | ||
*/ | ||
object StringRetriever { | ||
def getStringFrom(r: Reader) = { | ||
val cb = new StringBuilder | ||
var cr = 0 | ||
while (cr != -1) { | ||
cr = r.read | ||
println(cr) | ||
if (cr != -1) cb += cr.toChar | ||
} | ||
cb.result | ||
} | ||
} |