|
|
@@ -1,13 +1,10 @@
|
|
|
"use strict";
|
|
|
var MatchExpression = require('./MatchExpression');
|
|
|
-
|
|
|
- // Autogenerated by cport.py on 2013-09-17 14:37
|
|
|
var NotMatchExpression = module.exports = function NotMatchExpression(){
|
|
|
base.call(this);
|
|
|
this._matchType = 'NOT';
|
|
|
}, klass = NotMatchExpression, base = Object , proto = klass.prototype = Object.create(base.prototype, {constructor:{value:klass}});
|
|
|
|
|
|
- // File: expression_tree.h lines: 152-152
|
|
|
proto._exp = undefined;
|
|
|
|
|
|
/**
|
|
|
@@ -18,7 +15,6 @@ proto._exp = undefined;
|
|
|
*
|
|
|
*/
|
|
|
proto.debugString = function debugString(level) {
|
|
|
- // File: expression_tree.cpp lines: 146-149
|
|
|
return this._debugAddSpace( level ) + "$not\n" + this._exp._debugString( level + 1 );
|
|
|
};
|
|
|
|
|
|
@@ -30,19 +26,17 @@ proto.debugString = function debugString(level) {
|
|
|
*
|
|
|
*/
|
|
|
proto.equivalent = function equivalent(other) {
|
|
|
- // File: expression_tree.cpp lines: 152-156
|
|
|
return other._matchType == 'NOT' && this._exp.equivalent(other.getChild(0));
|
|
|
};
|
|
|
|
|
|
/**
|
|
|
*
|
|
|
- * Return the _exp property
|
|
|
- * @method getChild
|
|
|
+ * Return the reset child
|
|
|
+ * @method resetChild
|
|
|
*
|
|
|
*/
|
|
|
-proto.getChild = function getChild() {
|
|
|
- // File: expression_tree.h lines: 148-147
|
|
|
- return this._exp;
|
|
|
+proto.resetChild = function resetChild(newChild) {
|
|
|
+ this._exp.reset(newChild);
|
|
|
};
|
|
|
|
|
|
/**
|
|
|
@@ -53,7 +47,6 @@ proto.getChild = function getChild() {
|
|
|
*
|
|
|
*/
|
|
|
proto.init = function init(exp) {
|
|
|
- // File: expression_tree.h lines: 123-125
|
|
|
this._exp = exp;
|
|
|
return {'code':'OK'};
|
|
|
};
|
|
|
@@ -66,9 +59,8 @@ proto.init = function init(exp) {
|
|
|
* @param details
|
|
|
*
|
|
|
*/
|
|
|
-proto.matches = function matches(doc,details) {
|
|
|
- // File: expression_tree.h lines: 135-136
|
|
|
- return ! this._exp.matches( doc,null );
|
|
|
+proto.matches = function matches(doc, details) {
|
|
|
+ return ! this._exp.matches(doc, null);
|
|
|
};
|
|
|
|
|
|
/**
|
|
|
@@ -79,7 +71,6 @@ proto.matches = function matches(doc,details) {
|
|
|
*
|
|
|
*/
|
|
|
proto.matchesSingleElement = function matchesSingleElement(e) {
|
|
|
- // File: expression_tree.h lines: 139-140
|
|
|
return ! this._exp.matchesSingleElement( e );
|
|
|
};
|
|
|
|
|
|
@@ -91,7 +82,6 @@ proto.matchesSingleElement = function matchesSingleElement(e) {
|
|
|
*
|
|
|
*/
|
|
|
proto.numChildren = function numChildren(){
|
|
|
- // File: expression_tree.h lines: 147-146
|
|
|
return 1;
|
|
|
};
|
|
|
|
|
|
@@ -105,6 +95,9 @@ proto.shallowClone = function shallowClone(){
|
|
|
// File: expression_tree.h lines: 128-132
|
|
|
var e = new NotMatchExpression();
|
|
|
e.init(this._exp.shallowClone());
|
|
|
+ if ( this.getTag() ) {
|
|
|
+ e.setTag(this.getTag().clone());
|
|
|
+ }
|
|
|
return e;
|
|
|
};
|
|
|
|