feat(aa): make preamble rule classic aa rules.
This commit is contained in:
parent
068373405f
commit
a5c4eab0cf
8 changed files with 81 additions and 74 deletions
|
|
@ -14,6 +14,40 @@ const (
|
|||
tokIFEXISTS = "if exists"
|
||||
)
|
||||
|
||||
type Comment struct {
|
||||
RuleBase
|
||||
}
|
||||
|
||||
func newCommentFromRule(rule rule) (Rule, error) {
|
||||
base := newRuleFromRule(rule)
|
||||
base.IsLineRule = true
|
||||
return &Comment{RuleBase: base}, nil
|
||||
}
|
||||
|
||||
func (r *Comment) Less(other any) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (r *Comment) Equals(other any) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (r *Comment) String() string {
|
||||
return renderTemplate("comment", r)
|
||||
}
|
||||
|
||||
func (r *Comment) IsPreamble() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func (r *Comment) Constraint() RuleConstraint {
|
||||
return anyKind
|
||||
}
|
||||
|
||||
func (r *Comment) Kind() string {
|
||||
return tokCOMMENT
|
||||
}
|
||||
|
||||
type Abi struct {
|
||||
RuleBase
|
||||
Path string
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue