Skip to content

Conversation

@dave-artificial-agency
Copy link
Contributor

@dave-artificial-agency dave-artificial-agency commented Oct 22, 2025

Two fixes:

  1. I noticed that when parsing a Delay node, klee does not correctly parse escaped quotation marks \"\" in lines like DefaultValue="(Linkage=-1,UUID=-1,ExecutionFunction=\"\",CallbackTarget=None)". This results in error messages like "Didn't parse property attribute 'CallbackTarget'. There isn't a matching parser.". The issue is not actually being able to parse and render CallbackTarget, but rather how the PinPropertyParser handles escaped quotation marks. Add tests and a fix.
  2. It looks like Return Values that are Vectors currently display a blue line. But they should be a yellow line because they are Vectors. Add a patch to fix that also.

Repro cases:

klee fixed - blue to yellow

--
Change summary:

  • add tests for existing PinPropertyParser regex cases
  • add tests for parsing struct values with escaped quotes (tests fail before this patch)
  • improve regex to be able to parse struct values with escaped quotes (tests now pass)
  • add friendly name for Get Actor Location
  • correctly render vector type Return Value as yellow, not blue

..

This patch may look difficult to review because it is basically an opaque change to a regex.
I have tried to add unit tests for each of the regex cases to ensure no other functionality changes or is broken.
I'm happy to add other tests or test with other nodes if you have source text or test cases you want to check.

Like other PRs, this one is based on #8 , so the first commits to add tests are the same.

npm install --save-dev jest @types/jest ts-jest typescript
this test is slow. but it is correct.
fix for
>"The provided value 'undefined' is not a valid enum value of type CanvasTextAlign."
on load.

add test
context is only used by the NodeParserRegistry,
and NodeParserRegistry is already mocked.
update to match the syntax based on committed and merged code -
Joined-Forces@3c694f2
source text like

```
CustomProperties Pin (.. DefaultValue="(Linkage=-1,UUID=-1,ExecutionFunction=\"\",CallbackTarget=None)" ..)
```
@dave-artificial-agency dave-artificial-agency changed the title Parse escaped quotes Handle escaped quotes; Fix Vector return type color Oct 22, 2025
// ([^,]*) Type 5: capture pure values e.g.: PinType.bIsConst=False
const matches = propertyData.matchAll(/([a-zA-Z0-9_.]+)\s*=\s*(("[^"]*")|(\([^)]*\))|(\w*\(\w*(?:[^(]*\([^)]*(?:"[^"]*")\))*\))|(\w*\([^)]*\([^)]*\)[^)]*\))|(\w*\([^)]*\))|([^,]*))/g);
// ("(?:[^"\\]|\\.)*\([^)]*\)") Type 6: capture struct values with escaped quotes e.g.: DefaultValue="(ExecutionFunction=\"\",CallbackTarget=None)"
const matches = propertyData.matchAll(/([a-zA-Z0-9_.]+)\s*=\s*(("(?:[^"\\]|\\.)*\([^)]*\)")|("[^"]*")|(\([^)]*\))|(\w*\(\w*(?:[^(]*\([^)]*(?:"[^"]*")\))*\))|(\w*\([^)]*\([^)]*\)[^)]*\))|(\w*\([^)]*\))|([^,]*))/g);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With this regex change , several of these regex comments are no longer accurate. I can update them, or delete them so we don't have to maintain anything if that's better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant