Initial QSfera import

This commit is contained in:
Курнат Андрей
2026-06-07 10:20:04 +03:00
commit 2315f25754
16485 changed files with 4826827 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
package ast
import (
"strconv"
"strings"
)
type Comment struct {
Value string
Position *Position
}
func (c *Comment) Text() string {
return strings.TrimPrefix(c.Value, "#")
}
type CommentGroup struct {
List []*Comment
}
func (c *CommentGroup) Dump() string {
if len(c.List) == 0 {
return ""
}
var builder strings.Builder
for _, comment := range c.List {
builder.WriteString(comment.Value)
builder.WriteString("\n")
}
return strconv.Quote(builder.String())
}