Permalink
Browse files

Import statement and string representation fix.

  • Loading branch information...
1 parent c2c1feb commit 4475a50326ed4311d781f3ac3986342c1922198f @jonashaag jonashaag committed Jul 15, 2010
Showing with 7 additions and 2 deletions.
  1. +5 −0 hello.snow
  2. +1 −1 snowman/backends/c/__init__.py
  3. +1 −1 snowman/nodes.py
View
@@ -0,0 +1,5 @@
+import stdio
+
+main as Function(argc as Int, argv as String*) -> Int:
+ printf("Hello, ☃!")
+ return 0
@@ -72,7 +72,7 @@ def visit_Integer(self, node):
visit_Float = visit_Integer
def visit_String(self, node):
- return '"%s"' % node.children['value']
+ return '"%s"' % repr(node.children['value'])[1:-1]
def visit_Declaration(self, node):
return fmt('{type} {name}',
View
@@ -180,7 +180,7 @@ class If(Statement):
attributes = ['expr', 'block', ('else_block', None)]
class ImportStatement(Statement):
- attributes = ['name']
+ attributes = ['path']
class Loop(Statement):
abstract = True

0 comments on commit 4475a50

Please sign in to comment.