diff options
Diffstat (limited to 'Master/texmf-dist/tex/generic/pgf/modules/pgfmoduleoo.code.tex')
-rw-r--r-- | Master/texmf-dist/tex/generic/pgf/modules/pgfmoduleoo.code.tex | 37 |
1 files changed, 20 insertions, 17 deletions
diff --git a/Master/texmf-dist/tex/generic/pgf/modules/pgfmoduleoo.code.tex b/Master/texmf-dist/tex/generic/pgf/modules/pgfmoduleoo.code.tex index eba114885ea..1cd938af521 100644 --- a/Master/texmf-dist/tex/generic/pgf/modules/pgfmoduleoo.code.tex +++ b/Master/texmf-dist/tex/generic/pgf/modules/pgfmoduleoo.code.tex @@ -298,7 +298,7 @@ % } % define the method macro and append the method to the method collection -\def\pgfoo@declaremethod#1(#2)#3{% +\long\def\pgfoo@declaremethod#1(#2)#3{% \def\pgfoo@method{#1}% \ifx\pgfoo@classname\pgfoo@method \def\pgfoo@method{init}% @@ -595,15 +595,19 @@ }% }% } -\def\pgfoo@new#1=new #2({% - \expandafter\ifx\csname pgfooY#2.get id\endcsname\relax% - \pgferror{Unknown class '#2'}% +\def\pgfoo@new#1={% + \def\pgfutil@reserved@a{#1}% + \let\pgfutil@next\pgfoo@@new + \futurelet\pgfutil@let@token\pgfutil@ignorespaces} +\def\pgfoo@@new new #1({% + \expandafter\ifx\csname pgfooY#1.get id\endcsname\relax% + \pgferror{Unknown class '#1'}% \else% - \pgfoo@new@create#1{#2}% + \expandafter\pgfoo@new@create\pgfutil@reserved@a{#1}% {% \pgfoothis@count\pgfoo@objectcount% \let\pgfoo@attribute@op\pgfoolet - \csname pgfooY#2.@pgfoo@process@attributes\endcsname% + \csname pgfooY#1.@pgfoo@process@attributes\endcsname% }% \let\pgfoo@continue=\pgf@oo@new@cont% \expandafter\pgfoo@collect@args% @@ -615,27 +619,26 @@ \aftergroup\pgfoogc% cleanup after group } -\def\pgfoo@new@attribute#1=new #2({% - \expandafter\ifx\csname pgfooY#2.get id\endcsname\relax% - \pgferror{Unknown class '#2'}% +\def\pgfoo@new@attribute#1={% + \def\pgfutil@reserved@a{#1}% + \let\pgfutil@next\pgfoo@@new@attribute + \futurelet\pgfutil@let@token\pgfutil@ignorespaces} +\def\pgfoo@@new@attribute new #1({% + \expandafter\ifx\csname pgfooY#1.get id\endcsname\relax% + \pgferror{Unknown class '#1'}% \else% - \pgfoo@new@create\pgfoo@temp{#2}% + \pgfoo@new@create\pgfoo@temp{#1}% {% \pgfoothis@count\pgfoo@objectcount% \let\pgfoo@attribute@op\pgfoolet% - \csname pgfooY#2.@pgfoo@process@attributes\endcsname% + \csname pgfooY#1.@pgfoo@process@attributes\endcsname% }% - \pgfoolet{#1}\pgfoo@temp% + \expandafter\pgfoolet\expandafter{\pgfutil@reserved@a}\pgfoo@temp% \let\pgfoo@continue=\pgf@oo@new@cont% \expandafter\pgfoo@collect@args% \fi% } -\def\pgf@oo@new@cont{% - \expandafter\pgfoolastobj\expandafter.\expandafter i\expandafter n\expandafter i\expandafter t\expandafter(\the\pgfoo@toks)% - \aftergroup\pgfoogc% cleanup after group -} - \def\pgfoo@new@create#1#2{% \advance\pgfoo@objectcount by 1\relax% \edef\pgfoolastobj{\noexpand\pgfoo@caller{\the\pgfoo@objectcount}}% |