Commits

Joey Mazzarelli committed 50d450f

changes

  • Participants
  • Parent commits 0abb2f0

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