示例#1
0
文件: rules.go 项目: imjerrybao/c6
/*
ParseBlock method allows root level statements, which does not allow css properties.
*/
func (parser *Parser) ParseBlock() *ast.Block {
	debug("ParseBlock")
	parser.expect(ast.T_BRACE_OPEN)
	var block = ast.NewBlock()
	block.Stmts = parser.ParseStmts()
	parser.expect(ast.T_BRACE_CLOSE)
	return block
}
示例#2
0
文件: context.go 项目: imjerrybao/c6
func NewContext() *Context {
	return &Context{
		GlobalBlock: ast.NewBlock(),
		Mixins:      &symtable.SymTable{},
		Functions:   &symtable.SymTable{},
		Stack:       &Stack{},
	}
}