Skip to content

Commit 4df96d7

Browse files
committed
TASK: Remove floating points from NumberFormat
1 parent c820da1 commit 4df96d7

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

src/Definition/NumberFormat.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ public static function fromTokenType(TokenType $tokenType): self
3636
return match ($tokenType) {
3737
TokenType::NUMBER_BINARY => self::BINARY,
3838
TokenType::NUMBER_OCTAL => self::OCTAL,
39-
TokenType::NUMBER_DECIMAL,
40-
TokenType::PERIOD => self::DECIMAL,
39+
TokenType::NUMBER_DECIMAL => self::DECIMAL,
4140
TokenType::NUMBER_HEXADECIMAL => self::HEXADECIMAL,
4241

4342
default => throw new \Exception('@TODO: Unknown Number Format: ' . $tokenType->value)

test/Unit/Target/Php/Transpiler/IntegerLiteral/IntegerLiteralTranspilerTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ public static function integerLiteralExamples(): array
6161
// With Floating Point
6262
' 123.456 ' => ['123.456', '123.456'],
6363
' 0.1e2 ' => ['0.1e2', '0.1e2'],
64-
' .22 ' => ['.22', '.22'],
6564
];
6665
}
6766

0 commit comments

Comments
 (0)