|
@@ -21,8 +21,8 @@ discard block |
|
|
block discarded – undo |
|
21
|
21
|
elseif ((bool) preg_match(Regex::KEY, $trimmed, $matches)) return new NodeKey($nodeString, $line, $matches); |
|
22
|
22
|
else { |
|
23
|
23
|
$first = $trimmed[0]; |
|
24
|
|
- $stringGroups = ["-" ,'>|' ,'"\'',"#%" ,"{[" ,":?" ,'*&!']; |
|
25
|
|
- $methodGroups = ['Hyphen','Literal','Quoted','Special','Compact','SetElement','NodeAction']; |
|
|
24
|
+ $stringGroups = ["-", '>|', '"\'', "#%", "{[", ":?", '*&!']; |
|
|
25
|
+ $methodGroups = ['Hyphen', 'Literal', 'Quoted', 'Special', 'Compact', 'SetElement', 'NodeAction']; |
|
26
|
26
|
foreach ($stringGroups as $groupIndex => $stringRef) { |
|
27
|
27
|
if (is_int(strpos($stringRef, $first))) { |
|
28
|
28
|
$methodName = 'on'.$methodGroups[$groupIndex]; |
|
@@ -127,9 +127,9 @@ discard block |
|
|
block discarded – undo |
|
127
|
127
|
if (!((bool) preg_match(Regex::NODE_ACTIONS, trim($nodeString), $matches))) { |
|
128
|
128
|
return new NodeScalar($nodeString, $line); |
|
129
|
129
|
} |
|
130
|
|
- $action = trim($matches['action']);//var_dump($matches); |
|
|
130
|
+ $action = trim($matches['action']); //var_dump($matches); |
|
131
|
131
|
switch ($action[0]) { |
|
132
|
|
- case '!': return new NodeTag ($nodeString, $line); |
|
|
132
|
+ case '!': return new NodeTag($nodeString, $line); |
|
133
|
133
|
case '&': return new NodeAnchor($nodeString, $line); |
|
134
|
134
|
case '*': return new NodeAnchor($nodeString, $line); |
|
135
|
135
|
// default: |