Merge pull request #49 from seangates/patch-1

Allowing complex var names;
This commit is contained in:
Phillip Gates-Idem 2015-03-18 21:13:53 -04:00
commit ec772e116b

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
'use strict'; 'use strict';
var varNameRegExp = /^[A-Za-z_][A-Za-z0-9_\.]*$/; // var varNameRegExp = /^[A-Za-z_][A-Za-z0-9_\.]*$/;
function AssignNode(props) { function AssignNode(props) {
AssignNode.$super.call(this); AssignNode.$super.call(this);
if (props) { if (props) {
@ -27,9 +27,6 @@ AssignNode.prototype = {
var value = this.getProperty('value'); var value = this.getProperty('value');
if (!varName) { if (!varName) {
this.addError('"var" attribute is required'); this.addError('"var" attribute is required');
} else if (!varNameRegExp.test(varName)) {
this.addError('Invalid variable name of "' + varName + '"');
varName = null;
} }
if (!value) { if (!value) {
this.addError('"value" attribute is required'); this.addError('"value" attribute is required');