Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Mustang now compiles on Rock!

  • Loading branch information...
commit a13a2a71df6437227c16ca5b9d8a324d67aa6bed 1 parent 4e0faa1
Joshua Roesslein authored
2  Makefile
View
@@ -1,4 +1,4 @@
-OOC?=ooc
+OOC?=rock
all: mustang/*.ooc
mkdir -p bin
7 README
View
@@ -1,11 +1,12 @@
Mustang
=======
-A template engine for the ooc programming language.
-Mustang is a superset of the Mustache[1] syntax and is
+A template engine for the ooc programming language[1].
+Mustang is a superset of the Mustache[2] syntax and is
fully backwards compatible with existing Mustache templates.
Author: Joshua Roesslein
License: BSD
-[1] http://defunkt.github.com/mustache/
+[1] http://ooc-lang.org
+[2] http://defunkt.github.com/mustache
8 mustang/Node.ooc
View
@@ -27,7 +27,7 @@ TNode: abstract class {
TextNode: class extends TNode {
text: String
- init: func(=text) {}
+ init: func ~text (=text) {}
render: func(context: Context, out: Writer) {
out write(text)
@@ -40,7 +40,7 @@ VariableNode: class extends TNode {
variableName: String
escape: Bool
- init: func(=variableName, =escape) {}
+ init: func ~variable (=variableName, =escape) {}
render: func(context: Context, out: Writer) {
// Perform variable lookup in context
@@ -66,7 +66,7 @@ VariableNode: class extends TNode {
SectionNode: class extends TNode {
variableName: String
- init: func(=variableName) {}
+ init: func ~section (=variableName) {}
render: func(context: Context, out: Writer) {
variable := context resolve(variableName)
@@ -106,7 +106,7 @@ SectionNode: class extends TNode {
PartialNode: class extends TNode {
partial: Renderer
- init: func(=partial) {}
+ init: func ~partial (=partial) {}
render: func(context: Context, out: Writer) {
partial render(context, out)
2  mustang/Renderer.ooc
View
@@ -8,7 +8,7 @@ Renderer: class extends NodeWalker {
context: Context
output: Writer
- init: func(=rootNode) {}
+ init: func ~renderer (=rootNode) {}
onNode: func(node: TNode) {
node render(context, output)
6 mustang/Value.ooc
View
@@ -11,7 +11,7 @@ Value: abstract class {
StringValue: class extends Value {
value: String
- init: func(=value) {}
+ init: func ~string (=value) {}
emit: func -> String { value }
}
@@ -19,7 +19,7 @@ StringValue: class extends Value {
BoolValue: class extends Value {
value: Bool
- init: func(=value) {}
+ init: func ~bool (=value) {}
emit: func -> String { value toString() }
@@ -30,7 +30,7 @@ BoolValue: class extends Value {
ListValue: class extends Value {
list: List<Value>
- init: func ~withList(=list) {}
+ init: func ~withList (=list) {}
init: func ~empty { list = LinkedList<Value> new() }
emit: func -> String {
2  mustang/Walker.ooc
View
@@ -31,7 +31,7 @@ NodeWalker: abstract class {
NodePrinter: class extends NodeWalker {
rootNode: TNode
- init: func(=rootNode) {}
+ init: func ~printer (=rootNode) {}
print: func {
walk(rootNode, true)
2  mustang/YAMLContext.ooc
View
@@ -22,7 +22,7 @@ YAMLContext: class extends Context {
This loadFromFile(File new(path))
}
- init: func(parser: YAMLParser) {
+ init: func ~yaml (parser: YAMLParser) {
document := parser parseDocument()
rootValue := nodeToValue(document getRootNode())
if(rootValue class != HashValue) {
Please sign in to comment.
Something went wrong with that request. Please try again.