simple-graph-query 2.0.1 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -50025,12 +50025,12 @@ class ForgeExprEvaluator extends AbstractParseTreeVisitor_1.AbstractParseTreeVis
|
|
|
50025
50025
|
if (exports.SUPPORTED_BUILTINS.includes(identifier)) {
|
|
50026
50026
|
return identifier;
|
|
50027
50027
|
}
|
|
50028
|
-
// Check if this looks like a
|
|
50029
|
-
//
|
|
50030
|
-
|
|
50028
|
+
// Check if this looks like a label identifier (for label comparison).
|
|
50029
|
+
// Labels can be any alphanumeric string with underscores.
|
|
50030
|
+
// This allows identifiers like "Black", "red", "my_label", "Color_123", etc.
|
|
50031
|
+
// to be treated as string literals in label comparisons (e.g., @:y = Black).
|
|
50032
|
+
const labelLikePattern = /^[a-zA-Z_][a-zA-Z0-9_]*$/;
|
|
50031
50033
|
if (labelLikePattern.test(identifier)) {
|
|
50032
|
-
// This looks like a simple label (e.g., "black", "red", "blue", etc.)
|
|
50033
|
-
// Return it as a string literal to enable label comparison syntax
|
|
50034
50034
|
return identifier;
|
|
50035
50035
|
}
|
|
50036
50036
|
throw new NameNotFoundError(`bad name ${identifier} referenced!`);
|
package/package.json
CHANGED