Fix detection of tag type for unquoted string values
This commit is contained in:
parent
3e7bae969e
commit
4ac95f605b
2 changed files with 8 additions and 1 deletions
|
@ -41,14 +41,19 @@ enum TagType {
|
||||||
return TagType.End;
|
return TagType.End;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static const ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
||||||
|
|
||||||
static TagType getStringifiedTagType(StringReader reader) {
|
static TagType getStringifiedTagType(StringReader reader) {
|
||||||
reader.startSeek();
|
reader.startSeek();
|
||||||
TagType ret = TagType.End;
|
TagType ret = TagType.End;
|
||||||
bool isNumber = true;
|
bool isNumber = true;
|
||||||
|
bool isAlpha = true; // Is digits only
|
||||||
|
|
||||||
// Start to determine the next tag type
|
// Start to determine the next tag type
|
||||||
while (reader.canRead && ret == TagType.End) {
|
while (reader.canRead && ret == TagType.End) {
|
||||||
var val = reader.next().toUpperCase();
|
var val = reader.next().toUpperCase();
|
||||||
|
if (ALPHABET.indexOf(val) == -1) isAlpha = false;
|
||||||
|
|
||||||
switch (val) {
|
switch (val) {
|
||||||
case "{":
|
case "{":
|
||||||
{
|
{
|
||||||
|
@ -137,6 +142,8 @@ enum TagType {
|
||||||
}
|
}
|
||||||
|
|
||||||
reader.endSeek();
|
reader.endSeek();
|
||||||
|
if (!isNumber && isAlpha) ret = TagType.String;
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
name: libac_dart
|
name: libac_dart
|
||||||
description: "Aria's Creations code library"
|
description: "Aria's Creations code library"
|
||||||
version: 1.0.36
|
version: 1.0.37
|
||||||
homepage: "https://zontreck.com"
|
homepage: "https://zontreck.com"
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue