/
tomefile
/
lib-parser
Обзор
Документация
Войти
/
tomefile
/
lib-parser
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
main
node_literal.go
27 строк
464 B
BubbleFish
refactor: v2 Nodes
05 дек 2025, 12:39
Не верифицирован
05 дек 2025, 12:39
ca3b716
Код
Авторство
О чём код?
package libparser import "fmt" type NodeLiteral struct { Contents string NodeContext } func (node *NodeLiteral) Context() NodeContext { return node.NodeContext } func (node *NodeLiteral) String() string { return fmt.Sprintf("'%s'", node.Contents) } func (node *NodeLiteral) ToStringNode() *NodeString { return &NodeString{ Segments: SegmentedString{ &LiteralStringSegment{ Contents: node.Contents, }, }, NodeContext: node.Context(), } }