Use []byte instead of string in MaybeRuleAST
diff --git a/parser.go b/parser.go
index 4d0a8de..2090c0d 100644
--- a/parser.go
+++ b/parser.go
@@ -181,8 +181,8 @@
return ast
}
-func (p *parser) parseMaybeRule(line string, equalIndex, semicolonIndex int) AST {
- if len(strings.TrimSpace(line)) == 0 {
+func (p *parser) parseMaybeRule(line []byte, equalIndex, semicolonIndex int) AST {
+ if len(trimSpaceBytes(line)) == 0 {
return nil
}
@@ -602,7 +602,7 @@
}
}
if ast == nil {
- ast = p.parseMaybeRule(string(line), equalIndex, semicolonIndex)
+ ast = p.parseMaybeRule(line, equalIndex, semicolonIndex)
if ast != nil {
p.addStatement(ast)
}