implements PLN-0094

This commit is contained in:
2026-07-15 06:59:16 +01:00
parent 2b25364252
commit f700e400d5
5 changed files with 50 additions and 2 deletions
@@ -78,6 +78,7 @@ public final class PbsAst {
}
public sealed interface AttributeValue permits AttributeStringValue,
AttributeDocTextBlockValue,
AttributeIntValue,
AttributeBoolValue,
AttributeErrorValue {
@@ -89,6 +90,11 @@ public final class PbsAst {
Span span) implements AttributeValue {
}
public record AttributeDocTextBlockValue(
String value,
Span span) implements AttributeValue {
}
public record AttributeIntValue(
long value,
Span span) implements AttributeValue {
@@ -84,6 +84,10 @@ final class PbsAttributeParser {
final var token = cursor.previous();
return new PbsAst.AttributeStringValue(token.lexeme(), context.span(token.start(), token.end()));
}
if (cursor.match(PbsTokenKind.DOC_TEXT_BLOCK)) {
final var token = cursor.previous();
return new PbsAst.AttributeDocTextBlockValue(token.lexeme(), context.span(token.start(), token.end()));
}
if (cursor.match(PbsTokenKind.INT_LITERAL)) {
final var token = cursor.previous();
final var parsedLong = parseLongOrNull(token.lexeme());