Skip to content
This repository has been archived by the owner on Sep 25, 2018. It is now read-only.

validate send *expr attributes at parse time #387

Open
mattoshry opened this issue Jan 9, 2017 · 0 comments
Open

validate send *expr attributes at parse time #387

mattoshry opened this issue Jan 9, 2017 · 0 comments

Comments

@mattoshry
Copy link
Collaborator

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]

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant