2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-06 11:23:44 +08:00

fix: lint

This commit is contained in:
2025-12-01 16:29:37 +08:00
parent bd453daed9
commit 027eb73ab4
7 changed files with 14 additions and 27 deletions

View File

@@ -404,17 +404,16 @@ func (p *Parser) parseBlockDirective(token Token) (*Block, error) {
break
}
if nextToken.Type == NEWLINE {
switch nextToken.Type {
case NEWLINE:
continue
}
if nextToken.Type == DIRECTIVE {
case DIRECTIVE:
directive, err := p.parseDirective(nextToken)
if err != nil {
return nil, err
}
block.Directives = append(block.Directives, directive)
} else if nextToken.Type == COMMENT {
case COMMENT:
// 处理块内注释
comment := &Comment{
Text: nextToken.Value,
@@ -422,6 +421,8 @@ func (p *Parser) parseBlockDirective(token Token) (*Block, error) {
Column: nextToken.Column,
}
block.Comments = append(block.Comments, comment)
default:
continue
}
}