Skip to content

Commit bd17494

Browse files
committed
More examples and a fix.
1 parent bf3afca commit bd17494

File tree

5 files changed

+18
-1
lines changed

5 files changed

+18
-1
lines changed

examples/booleans.mustache

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{{#happy}}
2+
Smile
3+
{{/happy}}
4+
{{#sad}}
5+
Cry
6+
{{/sad}}

examples/booleans.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
happy: True
2+
sad: False

examples/comments.mustache

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{{! I am invisible! }}
2+
{{ message }}
3+
4+
{{!
5+
None of this will be seen as well.
6+
}}

examples/comments.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
message: Hello!
3+
...

mustang/YAMLContext.ooc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ YAMLContext: class extends Context {
3737
case ScalarNode => scalarToValue(node as ScalarNode)
3838
case SequenceNode => sequenceToListValue(node as SequenceNode)
3939
case MappingNode => mappingToHashValue(node as MappingNode)
40-
case => Exception new("Unknown node type!") throw(); null
40+
case => StringValue new(node toString())
4141
}
4242
}
4343

0 commit comments

Comments
 (0)