diff --git a/src/Parser/Attribute.php b/src/Parser/Attribute.php
index cc9cb98..4c29d67 100644
--- a/src/Parser/Attribute.php
+++ b/src/Parser/Attribute.php
@@ -40,6 +40,14 @@ public function getStaticValue(): mixed
throw new \LogicException("Cannot get static value of dynamic attribute '{$this->name}'.");
}
+ if ($this->valueless) {
+ return true;
+ }
+
+ if (! $this->bound()) {
+ return $this->value;
+ }
+
return match ($this->value) {
'true' => true,
'false' => false,
diff --git a/tests/ComparisonTest.php b/tests/ComparisonTest.php
index eb594de..155bd2a 100644
--- a/tests/ComparisonTest.php
+++ b/tests/ComparisonTest.php
@@ -58,6 +58,13 @@
['readonly' => false],
));
+test('foldable literal string attributes matching PHP constants', fn () => compare(<<<'BLADE'
+
+
+
+ BLADE
+));
+
test('same component in a slot doesnt affect parents attributes', fn () => compare(<<<'BLADE'
@@ -115,4 +122,4 @@
BLADE
-));
\ No newline at end of file
+));