Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
Dwoo
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Common
Dwoo
Commits
11ad7005
Commit
11ad7005
authored
Aug 21, 2008
by
Seldaek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* Fixes parsing bug with |modifier:param|modifier2} with:colon after it
git-svn-id:
svn://dwoo.org/dwoo/trunk@151
0598d79b-80c4-4d41-97ba-ac86fbbd088b
parent
3c603a81
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
10 deletions
+4
-10
Compiler.php
lib/Dwoo/Compiler.php
+4
-10
No files found.
lib/Dwoo/Compiler.php
View file @
11ad7005
...
...
@@ -2296,24 +2296,18 @@ class Dwoo_Compiler implements Dwoo_ICompiler
}
$cmdstr
=
$cmdstrsrc
;
$paramsep
=
':'
;
$paramspos
=
strpos
(
$cmdstr
,
$paramsep
);
$funcsep
=
strpos
(
$cmdstr
,
'|'
);
if
(
$funcsep
!==
false
&&
(
$paramspos
===
false
||
$paramspos
>
$funcsep
))
{
$paramspos
=
false
;
$cmdstr
=
substr
(
$cmdstr
,
0
,
$funcsep
);
if
(
!
preg_match
(
'/^(@{0,2}[a-z][a-z0-9_]*)(:)?/'
,
$cmdstr
,
$match
))
{
throw
new
Dwoo_Compilation_Exception
(
$this
,
'Invalid modifier name, started with : '
.
substr
(
$cmdstr
,
0
,
10
));
}
$paramspos
=
!
empty
(
$match
[
2
])
?
strlen
(
$match
[
1
])
:
false
;
$func
=
$match
[
1
];
$state
=
0
;
if
(
$paramspos
===
false
)
{
if
(
!
preg_match
(
'/^(@{0,2}[a-z][a-z0-9_]*)/'
,
$cmdstr
,
$match
))
{
throw
new
Dwoo_Compilation_Exception
(
$this
,
'Invalid modifier name, started with : '
.
substr
(
$cmdstr
,
0
,
10
));
}
$func
=
$match
[
1
];
$cmdstrsrc
=
substr
(
$cmdstrsrc
,
strlen
(
$func
));
$params
=
array
();
if
(
$this
->
debug
)
echo
'MODIFIER ('
.
$func
.
') CALLED WITH NO PARAMS<br/>'
;
}
else
{
$func
=
substr
(
$cmdstr
,
0
,
$paramspos
);
$paramstr
=
substr
(
$cmdstr
,
$paramspos
+
1
);
if
(
substr
(
$paramstr
,
-
1
,
1
)
===
$paramsep
)
{
$paramstr
=
substr
(
$paramstr
,
0
,
-
1
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment