Fix floats and doubles
This commit is contained in:
parent
84192c69db
commit
842a2b8f0c
4 changed files with 11 additions and 7 deletions
|
@ -1,3 +1,3 @@
|
|||
class Constants {
|
||||
static const VERSION = "1.2.082924+0654";
|
||||
static const VERSION = "1.2.082924+0707";
|
||||
}
|
||||
|
|
|
@ -50,6 +50,7 @@ enum TagType {
|
|||
bool isQuoted = false;
|
||||
bool isNumeric = true; // Assume true until proven otherwise
|
||||
bool isAlpha = true; // Assume true until proven otherwise
|
||||
bool hasDecimalPoint = false;
|
||||
StringBuffer buffer = StringBuffer();
|
||||
|
||||
while (reader.canRead) {
|
||||
|
@ -102,10 +103,13 @@ enum TagType {
|
|||
|
||||
buffer.write(current);
|
||||
|
||||
// Check if current character is a digit or numeric suffix
|
||||
if (!RegExp(r'^[0-9]$').hasMatch(current) &&
|
||||
!RegExp(r'^[sSbBiIlLfFdD]$').hasMatch(current)) {
|
||||
isNumeric = false; // Not purely numeric with possible suffix
|
||||
// Updated check to allow digits, decimal points, and numeric suffixes
|
||||
if (!RegExp(r'^[0-9]$').hasMatch(current)) {
|
||||
if (current == '.' && !hasDecimalPoint) {
|
||||
hasDecimalPoint = true; // Allow only one decimal point
|
||||
} else if (!RegExp(r'^[sSbBiIlLfFdD]$').hasMatch(current)) {
|
||||
isNumeric = false; // Not purely numeric or allowed decimal/suffix
|
||||
}
|
||||
}
|
||||
|
||||
// Check if current character is purely alphabetical
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
name: libac_dart
|
||||
description: "Aria's Creations code library"
|
||||
version: 1.2.082924+0654
|
||||
version: 1.2.082924+0707
|
||||
homepage: "https://zontreck.com"
|
||||
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ Future<void> main() async {
|
|||
});
|
||||
|
||||
test("Test directory size checking", () async {
|
||||
expect(await getDirectorySize("test"), 9981);
|
||||
expect(await getDirectorySize("test"), 12819);
|
||||
});
|
||||
|
||||
test("Test file info methods", () async {
|
||||
|
|
Loading…
Reference in a new issue