Joey Mazzarelli avatar Joey Mazzarelli committed 50d450f

changes

Comments (0)

Files changed (1)

src/phplemon/Trekel/Parser.y

 
 // [<id>]
 attribute(OUT) ::= LBRACKET IDENTIFIER(ID) RBRACKET. {
-  OUT = new Trekel_Node_Attribute_Exists(ID);
+  $attr = new Trekel_Node_Attribute_Exists();
+  $attr->setIdentifier(ID);
+  OUT = $attr;
 }
 
 // [<id>="value"]
 attribute(OUT) ::= LBRACKET IDENTIFIER(ID) EQ string(VAL) RBRACKET. {
-  OUT = new Trekel_Node_Attribute_Equals(ID, VAL);
+  $attr = new Trekel_Node_Attribute_Equals();
+  $attr->setIdentifier(ID);
+  $attr->setValue(VAL);
+  OUT = $attr;
 }
 
 // [<id>!="value"]
 attribute(OUT) ::= LBRACKET IDENTIFIER(ID) NEQ string(VAL) RBRACKET. {
-  OUT = new Trekel_Node_Attribute_NotEquals(ID, VAL);
+  $attr = new Trekel_Node_Attribute_NotEquals();
+  $attr->setIdentifier(ID);
+  $attr->setValue(VAL);
+  OUT = $attr;
 }
 
 // [<id>^="value"]
 attribute(OUT) ::= LBRACKET IDENTIFIER(ID) STARTSWITH string(VAL) RBRACKET. {
-  OUT = new Trekel_Node_Attribute_StartsWith(ID, VAL);
+  $attr = new Trekel_Node_Attribute_StartsWith();
+  $attr->setIdentifier(ID);
+  $attr->setValue(VAL);
+  OUT = $attr;
 }
 
 // [<id>$="value"]
 attribute(OUT) ::= LBRACKET IDENTIFIER(ID) ENDSWITH string(VAL) RBRACKET. {
-  OUT = new Trekel_Node_Attribute_EndsWith(ID, VAL);
+  $attr = new Trekel_Node_Attribute_EndsWith();
+  $attr->setIdentifier(ID);
+  $attr->setValue(VAL);
+  OUT = $attr;
 }
 
 // [<id>*="value"]
 attribute(OUT) ::= LBRACKET IDENTIFIER(ID) CONTAINS string(VAL) RBRACKET. {
-  OUT = new Trekel_Node_Attribute_Contains(ID, VAL);
+  $attr = new Trekel_Node_Attribute_Contains();
+  $attr->setIdentifier(ID);
+  $attr->setValue(VAL);
+  OUT = $attr;
 }
 
 // Strip of the quotes and just use the value
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.