Fix detection of tag type for unquoted string values

This commit is contained in:
zontreck 2024-07-02 20:47:13 -07:00
parent 3e7bae969e
commit 4ac95f605b
2 changed files with 8 additions and 1 deletions

View file

@ -41,14 +41,19 @@ enum TagType {
return TagType.End;
}
static const ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
static TagType getStringifiedTagType(StringReader reader) {
reader.startSeek();
TagType ret = TagType.End;
bool isNumber = true;
bool isAlpha = true; // Is digits only
// Start to determine the next tag type
while (reader.canRead && ret == TagType.End) {
var val = reader.next().toUpperCase();
if (ALPHABET.indexOf(val) == -1) isAlpha = false;
switch (val) {
case "{":
{
@ -137,6 +142,8 @@ enum TagType {
}
reader.endSeek();
if (!isNumber && isAlpha) ret = TagType.String;
return ret;
}
}

View file

@ -1,6 +1,6 @@
name: libac_dart
description: "Aria's Creations code library"
version: 1.0.36
version: 1.0.37
homepage: "https://zontreck.com"