def test_function_definition(): s = "foo(a, b,c)\n return a" styl = StylusParser() styl.parse(s) func = styl.stack[0] assert type(func) == AST.FunctionNode assert func.name == 'foo' assert func.args == ['a', 'b', 'c']
def xtest_function_block(): s = """add(x, y) x + y """ styl = StylusParser() styl.parse(s)
def test_block(): s = "body\ndiv\n color red" styl = StylusParser() styl.parse(s)