implements PLN-0094
This commit is contained in:
+6
@@ -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 {
|
||||
|
||||
+4
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user