Skip to content

validate send *expr attributes at parse time #387

Description

@mattoshry

https://www.w3.org/TR/scxml/#send
The following should be ECMA-validated at parse time: 'delayexpr', 'eventexpr', 'targetexpr', 'typeexpr'

If they are not valid ECMAScript expressions, the document should be rejected.

Unclear what validation the code at [1] is performing. Won't node will always have a $type ('send')? Is 'expr' a valid attribute of send?

			'send': function (node) {
				if(node.$type) {
					return validateJavascriptExpression(node.expr);
				}

				return [];

[1]

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions