/[suikacvs]/messaging/manakai/lib/Message/Util/PerlCode.dis
Suika

Contents of /messaging/manakai/lib/Message/Util/PerlCode.dis

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.36 - (hide annotations) (download)
Wed Oct 12 14:46:06 2005 UTC (19 years, 9 months ago) by wakaba
Branch: MAIN
Changes since 1.35: +59 -3010 lines
++ manakai/lib/Message/Util/ChangeLog	12 Oct 2005 14:38:20 -0000
2005-10-12  Wakaba  <wakaba@suika.fam.cx>

	* PerlCode.dis (ForClassCompat): Removed.

	* ManakaiNode.dis (ManakaiDOMNodeObject, ManakaiDOMNodeReference):
	Removed.
	(newNode): New method.
	(generateUniqueID): Algorithm has changed to save random
	string generation time.

	* DIS.dis (AUTOLOAD): "$Error::Level" fixed to "$Error::Depth".

++ manakai/lib/Message/DOM/ChangeLog	12 Oct 2005 14:30:20 -0000
2005-10-12  Wakaba  <wakaba@suika.fam.cx>

	* DOMCore.dis: Don't set "infoset:prefix" internal
	property unless it has non-null value.
	(newObject): "refNode" parameter introduced.
	(ManakaiDOMNode.newObject): Calls "NodeStem.newNode"
	method if "refNode" parameter is specified.
	(cloneNode): Don't set "read-only" flag.
	(getNodeReference): Caches the result.
	(selectAttributeNodeForRemove): Don't removes any other
	non-namespace-aware attribute nodes.

1 wakaba 1.1 Module:
2     @QName:
3     Util:PerlCode
4     @FullName:
5     @@lang: en
6     @@@:
7     Perl Code Constructor
8     @Namespace:
9     http://suika.fam.cx/~wakaba/archive/2005/manakai/Util/PerlCode#
10    
11     @Description:
12     @@lang:en
13     @@@:
14     This module provides an object-oriented interface to construct
15     Perl code.
16    
17 wakaba 1.30 @DISCore:author: DISCore|Wakaba
18 wakaba 1.1 @License:
19     @@@:
20     license:Perl+MPL
21     @@Original:
22     @@@FullName:
23     manakai <CODE::lib/manakai/genlib.pl>
24     @@@Year:2004
25 wakaba 1.30 @@@DISCore:author: DISCore|Wakaba
26 wakaba 1.1 @Date:
27     @@@:
28 wakaba 1.36 $Date: 2005/10/12 00:31:06 $
29 wakaba 1.1 @@ContentType:
30     dis:Date.RCS
31    
32     @Require:
33     @@Module:
34 wakaba 1.35 @@@QName: MDOM|DOMCore
35     @@@WithFor: ManakaiDOM|ManakaiDOMLatest
36 wakaba 1.1
37 wakaba 1.35 @DefaultFor: ManakaiDOM|ManakaiDOMLatest
38 wakaba 1.1
39     Namespace:
40     @DIS:
41     http://suika.fam.cx/~wakaba/archive/2005/manakai/Util/DIS#
42     @dis:
43     http://suika.fam.cx/~wakaba/archive/2004/8/18/lang#dis--
44 wakaba 1.20 @dx:
45     http://suika.fam.cx/~wakaba/archive/2005/manakai/Util/Error/DOMException#
46 wakaba 1.33 @ecore:
47     http://suika.fam.cx/~wakaba/archive/2005/manakai/Util/Error/Core/
48     @f:
49     http://suika.fam.cx/~wakaba/archive/2004/dom/feature#
50     @idl:
51     http://suika.fam.cx/~wakaba/archive/2004/dis/IDL#
52 wakaba 1.25 @kwd:
53     http://suika.fam.cx/~wakaba/archive/2005/rfc2119/
54 wakaba 1.1 @lang:
55     http://suika.fam.cx/~wakaba/archive/2004/8/18/lang#
56     @license:
57     http://suika.fam.cx/~wakaba/archive/2004/8/18/license#
58     @ManakaiDOM:
59     http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom#
60 wakaba 1.5 @MDOM:
61     http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom#ManakaiDOM.
62 wakaba 1.1 @MDOMX:
63     http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#
64 wakaba 1.30 @mn:
65     http://suika.fam.cx/~wakaba/archive/2005/manakai/Util/ManakaiNode#
66 wakaba 1.1 @pc:
67     http://suika.fam.cx/~wakaba/archive/2005/manakai/Util/PerlCode#
68     @rdf:
69     http://www.w3.org/1999/02/22-rdf-syntax-ns#
70     @rdfs:
71     http://www.w3.org/2000/01/rdf-schema#
72 wakaba 1.35 @s:
73     http://suika.fam.cx/~wakaba/archive/2004/dis/Markup#
74 wakaba 1.1 @Util:
75     http://suika.fam.cx/~wakaba/archive/2005/manakai/Util/
76    
77 wakaba 1.35 ## -- Module sets
78    
79     ResourceDef:
80     @QName: Util|
81     @For: ManakaiDOM|DOM
82     @rdf:type: dis|ModuleGroup
83     @FullName:
84     @@lang:en
85     @@@:
86     Manakai support modules
87     @DISPerl:packageName:
88     Message::Util::
89     @DISPerl:interfacePackageName:
90     @@@:
91     Message::Util::IF::
92     @@For: ManakaiDOM|ManakaiDOM !ManakaiDOM|ManakaiDOMLatest
93     @DISPerl:interfacePackageName:
94     @@@:
95     Message::Util::IFLatest::
96     @@For: ManakaiDOM|ManakaiDOMLatest
97     @ImplNote:
98     @@lang:en
99     @@@:
100     Resources <Q::Util|> for <Q::ManakaiDOM|all> and for <Q::ManakaiDOM|Perl>
101     is defined in module <Module::Util|ManakaiNode>.
102    
103 wakaba 1.1 ## -- Features
104    
105     ElementTypeBinding:
106     @Name: FeatureDef
107     @ElementType:
108     dis:ResourceDef
109     @ShadowContent:
110 wakaba 1.29 @@rdf:type: DOMFeature|Feature
111 wakaba 1.27 @@For: =ManakaiDOM|all
112 wakaba 1.1
113     ElementTypeBinding:
114     @Name: FeatureVerDef
115     @ElementType:
116     dis:ResourceDef
117     @ShadowContent:
118 wakaba 1.29 @@rdf:type: DOMFeature|Feature
119 wakaba 1.1
120     ElementTypeBinding:
121     @Name: featureQName
122     @ElementType:
123 wakaba 1.29 DOMFeature:name
124 wakaba 1.1 @ShadowContent:
125 wakaba 1.29 @@ContentType: DISCore|QName
126 wakaba 1.1
127     FeatureDef:
128     @QName: CoreFeature
129     @featureQName:
130     Util:PerlCode
131     @FeatureVerDef:
132     @@QName: CoreFeature10
133     @@Version: 1.0
134     @@ISA: CoreFeature
135     @@FullName:
136     @@@lang:en
137     @@@@:
138     Perl Code Constructor, version 1.0
139     @@Description:
140     @@@lang:en
141     @@@@:
142     Perl Code Constructor, version 1.0.
143    
144 wakaba 1.25 ElementTypeBinding:
145     @Name: IFClsDef
146     @ElementType:
147     dis:ResourceDef
148     @ShadowContent:
149     @@rdf:type:
150     @@@@: dis|MultipleResource
151     @@@ForCheck: !ManakaiDOM|ForIF !ManakaiDOM|ForClass
152     @@resourceFor: ManakaiDOM|ForIF
153 wakaba 1.36 @@resourceFor: ManakaiDOM|ForClass
154     @@For: ManakaiDOM|ManakaiDOM
155 wakaba 1.35
156     @@rdf:type:
157     @@@@: DISLang|Interface
158     @@@ForCheck: ManakaiDOM|ForIF
159    
160     @@rdf:type:
161     @@@@: DISLang|Class
162     @@@ForCheck: ManakaiDOM|ForClass
163     @@Implement:
164     @@@@: ||ManakaiDOM|ManakaiDOM||ManakaiDOM|ForIF
165     @@@ContentType: DISCore|TFPQNames
166     @@@ForCheck: ManakaiDOM|ForClass ManakaiDOM|ManakaiDOM
167     @@Implement:
168     @@@@: ||ManakaiDOM|ManakaiDOMLatest||ManakaiDOM|ForIF
169     @@@ContentType: DISCore|TFPQNames
170     @@@ForCheck: ManakaiDOM|ForClass ManakaiDOM|ManakaiDOMLatest
171    
172     @@f:implements: pc|CoreFeature10
173    
174     ElementTypeBinding:
175     @Name: IFClsETDef
176     @ElementType:
177     dis:ResourceDef
178     @ShadowContent:
179     @@rdf:type:
180     @@@@: dis|MultipleResource
181     @@@ForCheck: !ManakaiDOM|ForIF !ManakaiDOM|ForClass !s|ForML
182     @@resourceFor: ManakaiDOM|ForIF
183 wakaba 1.36 @@resourceFor: ManakaiDOM|ForClass
184 wakaba 1.35 @@resourceFor: s|ForML
185 wakaba 1.36 @@For: ManakaiDOM|ManakaiDOM
186 wakaba 1.25
187     @@rdf:type:
188 wakaba 1.35 @@@@: DISLang|Interface
189     @@@ForCheck: ManakaiDOM|ForIF
190 wakaba 1.25
191     @@rdf:type:
192 wakaba 1.35 @@@@: DISLang|Class
193 wakaba 1.25 @@@ForCheck: ManakaiDOM|ForClass
194     @@Implement:
195 wakaba 1.35 @@@@: ||ManakaiDOM|ManakaiDOM||ManakaiDOM|ForIF
196     @@@ContentType: DISCore|TFPQNames
197     @@@ForCheck: ManakaiDOM|ForClass ManakaiDOM|ManakaiDOM
198     @@Implement:
199     @@@@: ||ManakaiDOM|ManakaiDOMLatest||ManakaiDOM|ForIF
200 wakaba 1.25 @@@ContentType: DISCore|TFPQNames
201 wakaba 1.35 @@@ForCheck: ManakaiDOM|ForClass ManakaiDOM|ManakaiDOMLatest
202 wakaba 1.36
203 wakaba 1.35 @@s:elementType:
204     @@@@: ||+||s|ForML
205     @@@ContentType: DISCore|TFPQNames
206     @@@DISCore:stopISARecursive:1
207    
208     @@rdf:type:
209     @@@@: s|ElementType
210     @@@ForCheck: s|ForML
211 wakaba 1.25
212 wakaba 1.35 @@f:implements: pc|CoreFeature10
213 wakaba 1.25
214     ElementTypeBinding:
215     @Name: IFQName
216     @ElementType:
217     dis:QName
218     @ShadowContent:
219     @@ForCheck: ManakaiDOM|ForIF
220    
221     ElementTypeBinding:
222 wakaba 1.35 @Name: CQName
223     @ElementType:
224     dis:QName
225     @ShadowContent:
226 wakaba 1.36 @@ForCheck: ManakaiDOM|ForClass
227 wakaba 1.25
228     ElementTypeBinding:
229     @Name: IFISA
230     @ElementType:
231     dis:ISA
232     @ShadowContent:
233     @@ForCheck: ManakaiDOM|ForIF
234    
235     ElementTypeBinding:
236 wakaba 1.35 @Name: CISA
237     @ElementType:
238     dis:ISA
239     @ShadowContent:
240 wakaba 1.36 @@ForCheck: ManakaiDOM|ForClass
241 wakaba 1.25
242 wakaba 1.1 ## -- Classes
243    
244 wakaba 1.25 IFClsDef:
245     @IFQName: PerlCode
246 wakaba 1.35 @CQName: ManakaiPCCode
247 wakaba 1.25
248 wakaba 1.35 @CISA: DOMCore|ManakaiDOMElement
249 wakaba 1.25
250 wakaba 1.1 @enDesc:
251     A class on which another Perl code classes are constructed based.
252    
253     @Attr:
254 wakaba 1.6 @@Name: fileNode
255     @@enDesc:
256     The root <QUOTE::file> node of the tree to which this node belongs.
257 wakaba 1.25 @@Type: PerlCode
258 wakaba 1.6 @@Get:
259     @@@enDesc:
260     The <QUOTE::file> node of the tree.
261     @@@nullCase:
262     @@@@enDesc:
263     This node does not belong to any file tree.
264     @@@PerlDef:
265 wakaba 1.35 __DEEP{
266     $r = $self-><AG::Node.ownerDocument>
267     -><AG::Document.documentElement>;
268     if ($r) {
269     unless (defined $r-><AG::Node.namespaceURI> and
270     $r-><AG::Node.namespaceURI> eq <Q::pc:> and
271     $r-><AG::Node.localName> eq 'file') {
272     $r = null;
273     }
274     }
275     }__;
276 wakaba 1.6
277     @Method:
278     @@Name: replaceVariable
279     @@enDesc:
280     Replaces a variable.
281     \
282     {NOTE:: For objects of type <Class::ManakaiPerlFile>,
283 wakaba 1.11 <Class::ManakaiPerlPackageScope>,
284     <Class::ManakaiPerlSub> and
285     <Class::ManakaiPerlVariable>, the result is undefined.
286 wakaba 1.6 \
287     }
288     @@Param:
289     @@@Name: originalVariable
290     @@@Type:
291     lang:Perl::ManakaiDOM:all
292     @@@enDesc:
293     Original variable specification, including prefix.
294     \
295     {NOTE:: Qualified name variable and hash key is not supported.
296     \
297     }
298     @@Param:
299     @@@Name: newValue
300 wakaba 1.11 @@@Type:
301     DOMMain:any::ManakaiDOM:all
302 wakaba 1.6 @@@enDesc:
303     New value to replace.
304 wakaba 1.11 @@@InCase:
305 wakaba 1.25 @@@@Type: PerlCode
306 wakaba 1.11 @@@@enDesc:
307     New Perl code fragment to replace by.
308     @@@InCase:
309     @@@@Type:
310     lang:Perl::ManakaiDOM:all
311     @@@@enDesc:
312     Inline Perl code fragment string to replace by.
313 wakaba 1.6 @@Return:
314     @@@PerlDef:
315 wakaba 1.35 my $ln = $self-><AG::Node.localName>;
316     if ($ln eq 'unparsed' or
317     $ln eq 'inlineUnparsed') {
318     my $new_var = ref $newValue ? $newValue->stringify : ''.$newValue;
319     my $val = $self-><AG::Node.textContent>;
320     $val =~ s/\Q$originalVariable\E\b/$new_var/g;
321     $self-><AS::Node.textContent> ($val);
322     } elsif ($ln eq 'stringLiteral' or $ln eq 'atom' or
323     $ln eq 'tokens') {
324     #
325     } elsif ($self-><M::Node.hasChildNodes>) {
326     __DEEP{
327     my @child_nodes = @{$self-><AG::Node.childNodes>};
328     for my $child_node (@child_nodes) {
329     if (defined $child_node-><AG::Node.namespaceURI> and
330     $child_node-><AG::Node.namespaceURI> eq <Q::pc:>) {
331     if ($child_node-><AG::Node.localName> eq 'variable') {
332     if (substr ($originalVariable, 0, 1) eq
333     $child_node-><AG::PerlVariable.variableType> and
334     not defined $child_node-><AG::PerlVariable.packageName> and
335     substr ($originalVariable, 1) eq
336     $child_node-><AG::PerlVariable.pcLocalName> and
337     not defined $child_node-><AG::PerlVariable.hashKey>) {
338     if (ref $newValue) {
339     $self-><M::Node.replaceChild> ($child_node => $newValue);
340     } else { ## ISSUE: Is this correct?
341     $child_node-><M::PerlCodeInlines.appendCode> ($newValue);
342     }
343     }
344     } else { ## Non-variable child
345     $child_node-><M::PerlCode.replaceVariable>
346     ($originalVariable => $newValue);
347     }
348     } else {
349     #
350     }
351     }
352     }__;
353     } # has child
354    
355     @ResourceDef:
356 wakaba 1.36 @@ForCheck: ManakaiDOM|ForClass
357 wakaba 1.35 @@QName: addNameListAttr
358     @@rdf:type: DISPerl|BlockCode
359     @@PerlDef:
360     my %__mn = map {$_ => true}
361     split /\s+/, $node-><M::Element.getAttributeNS>
362     (<Q::pc:>, $attrName);
363     $__mn{$newName} = true;
364     $node-><M::Element.setAttributeNS>
365     (<Q::pc:>, 'pc:'.$attrName => join ' ', keys %__mn);
366    
367 wakaba 1.13
368     @Method:
369     @@Name: addUsePerlModuleName
370     @@enDesc:
371     Adds a Perl module into the list of Perl modules
372     <Perl::use>d by this code fragment.
373     @@Param:
374     @@@Name: moduleName
375 wakaba 1.35 @@@Type: DOMString
376 wakaba 1.13 @@@enDesc:
377     The name of the module package that should be <Perl::use>d.
378     @@Return:
379     @@@PerlDef:
380 wakaba 1.35 __DEEP{
381     __CODE{addNameListAttr::
382     $node => {$self},
383     $attrName => 'useModuleName',
384     $newName => {$moduleName},
385     }__;
386     }__;
387 wakaba 1.13
388     @Method:
389 wakaba 1.22 @@Name: addUseCharClassName
390     @@enDesc:
391     Adds a Perl module into the list of Perl character classes
392     <Perl::use>d by this code fragment.
393     @@Param:
394     @@@Name: moduleName
395 wakaba 1.35 @@@Type: DOMString
396 wakaba 1.22 @@@enDesc:
397     The name of the module package that should be <Perl::use>d.
398     @@Param:
399     @@@Name: charClassName
400 wakaba 1.35 @@@Type: DOMString
401 wakaba 1.22 @@@enDesc:
402     The name of the character class.
403     @@Return:
404     @@@PerlDef:
405 wakaba 1.35 __DEEP{
406     __CODE{addNameListAttr::
407     $node => {$self},
408     $attrName => 'useCharClassName',
409     $newName => {$moduleName.'.'.$charClassName},
410     }__;
411     }__;
412 wakaba 1.22
413     @Method:
414 wakaba 1.19 @@Name: addRequirePerlModuleName
415     @@enDesc:
416     Adds a Perl module into the list of Perl modules
417     <Perl::require>d by this code fragment.
418     @@Param:
419     @@@Name: moduleName
420 wakaba 1.35 @@@Type: DOMString
421 wakaba 1.19 @@@enDesc:
422     The name of the module package that should be <Perl::require>d.
423     @@Return:
424     @@@PerlDef:
425 wakaba 1.35 __DEEP{
426     __CODE{addNameListAttr::
427     $node => {$self},
428     $attrName => 'requireModuleName',
429     $newName => {$moduleName},
430     }__;
431     }__;
432 wakaba 1.19
433     @Method:
434 wakaba 1.33 @@Name: addExceptionInterfacePackageName
435     @@enDesc:
436     Adds a Perl exception interface into the list of Perl packages.
437     @@Param:
438     @@@Name: moduleName
439 wakaba 1.35 @@@Type: DOMString
440 wakaba 1.33 @@@enDesc:
441     The name of the interface package.
442     @@Return:
443     @@@PerlDef:
444 wakaba 1.35 __DEEP{
445     __CODE{addNameListAttr::
446     $node => {$self},
447     $attrName => 'exceptionInterfaceName',
448     $newName => {$moduleName},
449     }__;
450     }__;
451    
452     @ResourceDef:
453 wakaba 1.36 @@ForCheck: ManakaiDOM|ForClass
454 wakaba 1.35 @@QName: getNameListAttrR
455     @@rdf:type: DISPerl|BlockCode
456     @@PerlDef:
457     my @__nodes = ($node);
458     my %__result;
459     while (@__nodes) {
460     my $__cnode = shift @__nodes;
461     if ($__cnode-><AG::Node.nodeType> == <C::Node.ELEMENT_NODE> and
462     defined $__cnode-><AG::Node.namespaceURI> and
463     $__cnode-><AG::Node.namespaceURI> eq <Q::pc:>) {
464     for (split /\s+/, $__cnode-><M::Element.getAttributeNS>
465     (<Q::pc:>, $attrName)) {
466     $__result{$_} = true;
467     }
468     push @__nodes, @{$__cnode-><AG::Node.childNodes>};
469     }
470     }
471     $result = [sort {$a cmp $b} keys %__result];
472     @ResourceDef:
473 wakaba 1.36 @@ForCheck: ManakaiDOM|ForClass
474 wakaba 1.35 @@QName: getNameListAttr
475     @@rdf:type: DISPerl|BlockCode
476     @@PerlDef:
477     my %__result;
478     for (split /\s+/,
479     $node-><M::Element.getAttributeNS> (<Q::pc:>, $attrName)) {
480     $__result{$_} = true;
481     }
482     $result = [sort {$a cmp $b} keys %__result];
483 wakaba 1.33
484     @Method:
485 wakaba 1.15 @@Name: getUsePerlModuleNameList
486     @@enDesc:
487     Returns a list of Perl modules names that is <Perl::use>d
488     by this code fragment, including all descendant nodes.
489     @@Return:
490 wakaba 1.35 @@@Type: DISPerl|ARRAY||ManakaiDOM|all
491 wakaba 1.15 @@@enDesc:
492     A list of module names. Note that the list is <EM::dead>;
493     any modification to it does not affect to the code fragment
494     and vice versa.
495     @@@PerlDef:
496 wakaba 1.35 __DEEP{
497     __CODE{getNameListAttrR::
498     $node => {$self},
499     $attrName => 'useModuleName',
500     $result => {$r},
501     }__;
502     }__;
503 wakaba 1.15
504     @Method:
505 wakaba 1.22 @@Name: getUseCharClassNameList
506     @@enDesc:
507     Returns a list of Perl character class names that is <Perl::use>d
508     by this code fragment, including all descendant nodes.
509     @@Return:
510 wakaba 1.35 @@@Type: DISPerl|HASH||ManakaiDOM|all
511 wakaba 1.22 @@@enDesc:
512     A list of module names. Note that the list is <EM::dead>;
513     any modification to it does not affect to the code fragment
514     and vice versa.
515     @@@PerlDef:
516 wakaba 1.35 my $mc;
517     __DEEP{
518     __CODE{getNameListAttrR::
519     $node => {$self},
520     $attrName => 'useCharClassName',
521     $result => {$mc},
522     }__;
523     }__;
524     for (@$mc) {
525     my ($m, $c) = split /\./, $_, 2;
526     $r->{$m}->{$c} = true;
527     }
528 wakaba 1.22
529     @Method:
530 wakaba 1.19 @@Name: getRequirePerlModuleNameList
531     @@enDesc:
532     Returns a list of Perl modules names that is <Perl::require>d
533     by this code fragment, including all descendant nodes.
534     @@Return:
535 wakaba 1.35 @@@Type: DISPerl|ARRAY||ManakaiDOM|all
536 wakaba 1.19 @@@enDesc:
537     A list of module names. Note that the list is <EM::dead>;
538     any modification to it does not affect to the code fragment
539     and vice versa.
540     @@@PerlDef:
541 wakaba 1.35 __DEEP{
542     __CODE{getNameListAttrR::
543     $node => {$self},
544     $attrName => 'requireModuleName',
545     $result => {$r},
546     }__;
547     }__;
548 wakaba 1.19
549     @Method:
550 wakaba 1.33 @@Name: getExceptionInterfacePackageNameList
551     @@enDesc:
552     Returns a list of Perl exception interface package names
553     by this code fragment, including all descendant nodes.
554     @@Return:
555 wakaba 1.35 @@@Type: DISPerl|ARRAY||ManakaiDOM|all
556 wakaba 1.33 @@@enDesc:
557     A list of package names. Note that the list is <EM::dead>;
558     any modification to it does not affect to the code fragment
559     and vice versa.
560     @@@PerlDef:
561 wakaba 1.35 __DEEP{
562     __CODE{getNameListAttrR::
563     $node => {$self},
564     $attrName => 'exceptionInterfaceName',
565     $result => {$r},
566     }__;
567     }__;
568 wakaba 1.33
569     @Method:
570 wakaba 1.13 @@Name: disAddRequireURI
571     @@enDesc:
572     Adds a <QUOTE::dis> resource into the list of <Perl::require>d
573     resources of this code fragment.
574     @@Param:
575     @@@Name: uriArg
576 wakaba 1.35 @@@Type: DOMString
577 wakaba 1.13 @@@enDesc:
578     The URI reference of the resource to add.
579     @@Return:
580     @@@PerlDef:
581 wakaba 1.35 __DEEP{
582     __CODE{addNameListAttr::
583     $node => {$self},
584     $attrName => 'requireResourceURI',
585     $newName => {$uriArg},
586     }__;
587     }__;
588 wakaba 1.15
589     @Method:
590     @@Name: disGetRequireURIList
591     @@enDesc:
592     Returns a list of <QUOTE::dis> resource URI references that is
593     <Perl::require>d by this code fragment, including all descendant nodes.
594     @@Return:
595 wakaba 1.35 @@@Type: DISPerl|ARRAY||ManakaiDOM|all
596 wakaba 1.15 @@@enDesc:
597     A list of resource URI references. Note that the list is <EM::dead>;
598     any modification to it does not affect to the code fragment
599     and vice versa.
600     @@@PerlDef:
601 wakaba 1.35 __DEEP{
602     __CODE{getNameListAttrR::
603     $node => {$self},
604     $attrName => 'requireResourceURI',
605     $result => {$r},
606     }__;
607     }__;
608    
609     @Method:
610 wakaba 1.36 @@ForCheck: ManakaiDOM|ForClass
611 wakaba 1.35 @@Operator: DISPerl|CloneMethod
612     @@Return:
613     @@@Type: PerlCode
614     @@@PerlDef:
615     __DEEP{
616     $r = $self-><M::Node.cloneNode> (true);
617     }__;
618 wakaba 1.25 ##PerlCode
619 wakaba 1.1
620 wakaba 1.13 PropDef:
621     @QName: useModuleName
622     @enDesc:
623     The list of modules.
624    
625     PropDef:
626 wakaba 1.33 @QName: pc|exceptionInterfaceName
627     @enDesc:
628     The list of exception interface packages.
629    
630     PropDef:
631 wakaba 1.22 @QName: useCharClassName
632     @enDesc:
633     The list of modules.
634    
635     PropDef:
636 wakaba 1.13 @QName: requireResourceURI
637     @enDesc:
638     The list of resources.
639    
640 wakaba 1.35 ElementTypeBinding:
641     @Name: ETQName
642     @ElementType:
643     dis:AppName
644     @ShadowContent:
645     @@ForCheck: s|ForML
646     @@ContentType: DISCore|QName
647    
648     IFClsETDef:
649 wakaba 1.25 @IFQName: PerlFile
650 wakaba 1.35 @CQName: ManakaiPCFile
651     @ETQName: pc|file
652 wakaba 1.25
653     @IFISA: PerlCode
654    
655     @IFISA: PerlCodeStatements
656 wakaba 1.35 @CISA: ManakaiPCCodeStatements
657 wakaba 1.25
658 wakaba 1.1 @enDesc:
659     Perl source code files.
660    
661     @Method:
662     @@Name: appendNewPackage
663     @@enDesc:
664     Appends a new package scope block.
665     @@Param:
666     @@@Name: packageName
667 wakaba 1.35 @@@Type: DOMString
668 wakaba 1.1 @@@enDesc:
669     The fully-qualified name of the package to create.
670     @@Return:
671 wakaba 1.25 @@@Type: PerlPackage
672 wakaba 1.1 @@@enDesc:
673     The newly created package scope object.
674     @@@PerlDef:
675 wakaba 1.35 __DEEP{
676     $r = $self-><AG::Node.ownerDocument>-><M::Document.createElementNS>
677     (<Q::pc:>, 'package');
678     $r-><AS::PerlPackage.packageName> ($packageName);
679     $self-><M::Node.appendChild> ($r);
680     }__;
681 wakaba 1.1
682     @Method:
683 wakaba 1.13 @@Name: appendPackage
684     @@enDesc:
685     Appends a Perl package scope object.
686     @@Param:
687     @@@Name: codeArg
688 wakaba 1.25 @@@Type: PerlPackage
689 wakaba 1.13 @@@enDesc:
690     The package to append.
691     @@Return:
692     @@@RaiseException:
693     @@@@@:IN_USE_NODE_ERR
694     @@@@enDesc:
695     An attempt is made to set a subroutine that is
696     already used elsewhere.
697     @@@PerlDef:
698 wakaba 1.35 if ($codeArg-><AG::Node.parentNode>) {
699     __EXCEPTION{IN_USE_NODE_ERR::
700     pc:childNode => {$codeArg},
701     MDOMX:param-name => 'codeArg',
702     }__;
703 wakaba 1.1 }
704     __DEEP{
705 wakaba 1.35 $self-><AG::Node.ownerDocument>-><M::Document.adoptNode> ($codeArg);
706     $self-><M::Node.appendChild> ($codeArg);
707 wakaba 1.1 }__;
708    
709     @Method:
710     @@Name: getLastPackage
711     @@enDesc:
712     Gets the last package scope block of a name.
713     @@Param:
714     @@@Name: packageName
715 wakaba 1.36 @@@@Type: DOMString
716 wakaba 1.1 @@@@enDesc:
717     The fully-qualified name of the package to get.
718     @@NamedParam:
719     @@@Name: makeNewPackage
720 wakaba 1.36 @@@Type: idl|boolean||ManakaiDOM|all
721 wakaba 1.1 @@@enDesc:
722     Whether a new package scope object should be created if
723     no package of <P::packageName> found.
724     @@@TrueCase:
725     @@@@enDesc:
726     Makes a new object if not found.
727     @@@FalseCase:
728     @@@@enDesc:
729     Don't make a new object.
730     @@Return:
731 wakaba 1.25 @@@Type: PerlPackage
732 wakaba 1.1 @@@enDesc:
733     The last package scope object whose name is equal to
734     <P::packageName>.
735     @@@nullCase:
736     @@@@enDesc:
737     There is no <P::packageName> package object and
738     the <P::makeNewPackage> parameter is set to <DOM::false>.
739     @@@PerlDef:
740 wakaba 1.35 __DEEP{
741     for my $child (@{$self-><AG::Node.childNodes>}) {
742     if ($child-><AG::Node.nodeType> == <C::Node.ELEMENT_NODE> and
743     defined $child-><AG::Node.namespaceURI> and
744     $child-><AG::Node.namespaceURI> eq <Q::pc:> and
745     $child-><AG::Node.localName> eq 'package') {
746     if ($child-><M::Element.getAttributeNS>
747     (<Q::pc:>, 'packageName') eq $packageName) {
748     $r = $child;
749     }
750     }
751     }
752     if (not $r and $makeNewPackage) {
753     $r = $self-><M::PerlFile.appendNewPackage> ($packageName);
754     }
755     }__;
756 wakaba 1.1
757 wakaba 1.35 @ATTR:
758 wakaba 1.1 @@Name: sourceFile
759 wakaba 1.35 @@ATTRQName: pc|sourceFile
760 wakaba 1.1 @@enDesc:
761     The file name of the source file from which this
762     Perl code is primary generated.
763 wakaba 1.35 @@ReflectCDATA:
764 wakaba 1.1 @@Get:
765     @@Set:
766    
767 wakaba 1.35 @ATTR:
768 wakaba 1.1 @@Name: sourceModule
769 wakaba 1.35 @@ATTRQName: pc|sourceModule
770 wakaba 1.1 @@enDesc:
771     The name URI reference of the source module that this package defines.
772 wakaba 1.35 @@ReflectCDATA:
773 wakaba 1.1 @@Get:
774     @@Set:
775    
776 wakaba 1.35 @ATTR:
777 wakaba 1.1 @@Name: sourceFor
778 wakaba 1.35 @@ATTRQName: pc|sourceFor
779 wakaba 1.1 @@enDesc:
780     The URI reference of the source module <QUOTE::for> for which this
781     package is.
782 wakaba 1.35 @@ReflectCDATA:
783 wakaba 1.1 @@Get:
784     @@Set:
785    
786     @ToStringMethod:
787     @@Return:
788 wakaba 1.35 @@@Type: DOMString
789 wakaba 1.1 @@@enDesc:
790     The Perl code generated.
791     @@@PerlDef:
792 wakaba 1.35 __DEEP{
793     ## -- Header
794     $r = qq<#!/usr/bin/perl \n>;
795 wakaba 1.36 $r .= <ClassM::ManakaiPCImplementation.perlComment>
796 wakaba 1.35 (q<This file is automatically generated>);
797 wakaba 1.36 $r .= <ClassM::ManakaiPCImplementation.perlComment>
798     (q< at >.<ClassM::ManakaiPCImplementation
799 wakaba 1.35 .rfc3339DateTime> (time).q<,>);
800 wakaba 1.36 $r .= <ClassM::ManakaiPCImplementation.perlComment>
801 wakaba 1.35 (q< from file ">.$self-><AG::PerlFile.sourceFile>.q<",>);
802 wakaba 1.36 $r .= <ClassM::ManakaiPCImplementation.perlComment>
803 wakaba 1.35 (q[ module <].$self-><AG::PerlFile.sourceModule>.q[>,]);
804 wakaba 1.36 $r .= <ClassM::ManakaiPCImplementation.perlComment>
805 wakaba 1.35 (q[ for <].$self-><AG::PerlFile.sourceFor>.q[>.]);
806 wakaba 1.36 $r .= <ClassM::ManakaiPCImplementation.perlComment>
807 wakaba 1.35 (q<Don't edit by hand!>);
808     $r .= qq<use strict;\n>;
809     $self-><AS::PerlFile.currentPackage> ('main');
810     $self-><AS::PerlFile.currentChunkNumber> (0);
811    
812     ## -- Requires
813     my $req = $self-><M::PerlCode.getRequirePerlModuleNameList>;
814     for my $pack (sort {$a cmp $b} @$req) {
815     $r .= qq<require $pack;\n>;
816     }
817    
818     ## -- Packages and global objects
819     my $pack = {};
820     for my $child (@{$self-><AG::Node.childNodes>}) {
821     $r .= $child->stringify;
822     if ($child-><AG::Node.nodeType> == <C::Node.ELEMENT_NODE> and
823     defined $child-><AG::Node.namespaceURI> and
824     $child-><AG::Node.namespaceURI> eq <Q::pc:> and
825     $child-><AG::Node.localName> eq 'package') {
826     for my $ipack (@{$child-><M::PerlPackage
827     .getImplementPackageNameList>}) {
828     $pack->{$ipack} ||= true; # not defined
829     }
830     $pack->{$child-><AG::PerlPackage.packageName>} = []; # defined
831     }
832     }
833    
834     ## -- Exception interface packages
835     for (sort {$a cmp $b} @{$self-><M::PerlCode
836     .getExceptionInterfacePackageNameList>}) {
837     next if ref $pack->{$_};
838     $pack->{$_} = [];
839     $r .= sprintf q<push @%s::ISA, 'Message::Util::Error' >.
840     q<unless @%s::ISA;%s>, $_, $_, "\n";
841     }
842    
843     ## -- Enables interface packages
844     my @packs = map {'$' . $_ . '::'}
845     sort {$a cmp $b}
846     grep {not ref $pack->{$_} and $pack->{$_}}
847     keys %$pack;
848     $r .= q<for (>. join (', ', @packs) . qq<){}\n> if @packs;
849    
850     ## -- Footer
851 wakaba 1.36 $r .= <ClassM::ManakaiPCImplementation.perlComment>
852 wakaba 1.35 (q[License: <].$self-><AG::PerlFile.licenseURI>.qq[>\n]);
853     $r .= qq<1;\n>;
854     }__;
855 wakaba 1.1
856     @Attr:
857     @@Name: currentPackage
858     @@enDesc:
859     The current Perl package (used in stringify method).
860 wakaba 1.35
861     {NOTE:: This attribute is not preserved by the <Perl::clone> operation.
862     }
863     @@Type: DOMString
864 wakaba 1.1 @@Get:
865     @@@disDef:
866     @@@@GetProp: currentPackage
867     @@Set:
868     @@@disDef:
869     @@@@SetProp: currentPackage
870    
871     @Attr:
872 wakaba 1.6 @@Name: currentChunkNumber
873 wakaba 1.1 @@enDesc:
874 wakaba 1.6 The current code chunk number (used in stringify method).
875 wakaba 1.35
876     {NOTE:: This attribute is not preserved by the <Perl::clone> operation.
877     }
878     @@Type: idl|unsignedLong||ManakaiDOM|all
879 wakaba 1.1 @@Get:
880     @@@disDef:
881     @@@@GetProp: currentChunk
882     @@Set:
883     @@@disDef:
884     @@@@SetProp: currentChunk
885 wakaba 1.6
886     @Method:
887     @@Name: getNextChunkNumber
888     @@enDesc:
889     Increments the current chunk number of this file
890     and returns it.
891     @@Return:
892 wakaba 1.35 @@@Type: idl|unsignedLong||ManakaiDOM|all
893 wakaba 1.6 @@@enDesc:
894     The next chunk number.
895     @@@PerlDef:
896 wakaba 1.30 $r = ++$self->{<H::mn:node>}->{<H::pc:currentChunk>};
897 wakaba 1.2
898 wakaba 1.35 @ATTR:
899 wakaba 1.2 @@Name: licenseURI
900 wakaba 1.36 @@ATTRQName: pc|license
901 wakaba 1.2 @@enDesc:
902     The license term URI reference for this code.
903 wakaba 1.35 @@ReflectCDATA:
904 wakaba 1.2 @@Get:
905     @@Set:
906 wakaba 1.1 ##PerlFile
907    
908     PropDef:
909 wakaba 1.36 @QName: pc|currentChunk
910 wakaba 1.1 @enDesc:
911 wakaba 1.36 The current chunk number.
912 wakaba 1.1
913     PropDef:
914 wakaba 1.36 @QName: pc|currentPackage
915 wakaba 1.1 @enDesc:
916 wakaba 1.36 The current package fully qualified name.
917 wakaba 1.1
918 wakaba 1.35 ElementTypeBinding:
919     @Name: ReflectCDATA
920     @ElementType:
921     dis:Type
922     @ShadowContent:
923     @@@: DOMString
924     @ShadowSibling:
925     @@actualType: CDATADOMString
926    
927     ResourceDef:
928     @QName: DOMString
929     @For: ManakaiDOM|Perl
930     @AliasFor: DOMMain|DOMString||ManakaiDOM|ManakaiDOMLatest
931    
932     ReflectTypeDef:
933     @QName: CDATADOMString
934     @enDesc:
935     <IF::DOMMain:DOMString> for DOM attributes reflecting
936     <SGML::CDATA> element attributes.
937     @rdfs:subClassOf: DOMString
938     @ResourceDef:
939     @@rdf:type: DOMMain|ReflectGet
940     @@enDesc:
941     The DOM attribute returns the current value of the element attribute
942     in a transparent, case-sensitive manner.
943     \
944     If the element attribute is absent, the default value, if any,
945     or an empty string is returned.
946     @@PerlCDef:
947     __DEEP{
948     $r = $self-><M::Element.getAttributeNS> ($NS_URI_NO_NULL, $LOCAL_NAME);
949     }__;
950     @ResourceDef:
951     @@QName: CDATADOMStringSet
952     @@rdf:type: DOMMain|ReflectSet
953     @@enDesc:
954     The corresponding element attribute is set to the given value,
955     in a transparent, case-sensitive manner.
956     @@ImplNote:
957     @@@lang:en
958     @@@@:
959     What will happen if the <DOM::null> value is given?
960     @@PerlCDef:
961     __DEEP{
962     if (defined $given) {
963     $self-><M::Element.setAttributeNS> ($NS_URI_NO_NULL, $LOCAL_NAME
964     => $given);
965     } else {
966     $self-><M::Element.removeAttributeNS> ($NS_URI_NO_NULL, $LOCAL_NAME);
967     }
968     }__;
969    
970     ElementTypeBinding:
971     @Name: ReflectTypeDef
972     @ElementType:
973     dis:ResourceDef
974     @ShadowContent:
975     @@rdf:type: DISLang|DataType
976     @@ForCheck: !ManakaiDOM|IDL
977     @@For: ManakaiDOM|DOM
978    
979     ElementTypeBinding:
980     @Name: ATTR
981     @ElementType:
982     dis:ResourceDef
983     @ShadowContent:
984     @@rdf:type:
985     @@@@: s|Attribute
986     @@@ForCheck: s|ForML
987     @@rdf:type:
988     @@@@: DISLang|Attribute
989     @@@ForCheck: ManakaiDOM|ForClass
990     @@rdf:type:
991     @@@@: DISLang|Attribute
992     @@@ForCheck: ManakaiDOM|ForIF
993     @@DocAttr:
994     @@@@: ||+||s|ForML
995     @@@ContentType: DISCore|TFPQNames
996     @@@ForCheck: ManakaiDOM|ForClass
997     @@DocAttr:
998     @@@@: ||+||s|ForML
999     @@@ContentType: DISCore|TFPQNames
1000     @@@ForCheck: ManakaiDOM|ForIF
1001     @@ForCheck: !=ManakaiDOM|ManakaiDOM
1002    
1003     ElementTypeBinding:
1004     @Name: ATTRQName
1005     @ElementType:
1006     dis:AppName
1007     @ShadowContent:
1008     @@ForCheck: s|ForML
1009     @@ContentType: DISCore|QName
1010    
1011     IFClsETDef:
1012 wakaba 1.25 @IFQName: PerlPackage
1013 wakaba 1.35 @CQName: ManakaiPCPackage
1014     @ETQName: pc|package
1015 wakaba 1.25
1016     @IFISA: PerlCode
1017    
1018     @IFISA: PerlCodeStatements
1019 wakaba 1.35 @CISA: ManakaiPCCodeStatements
1020 wakaba 1.16
1021     @enDesc:
1022     A Perl lexical lines for which a <Perl::package> declaration
1023     in effect.
1024 wakaba 1.1
1025 wakaba 1.35 @ATTR:
1026 wakaba 1.1 @@Name: packageName
1027 wakaba 1.35 @@ATTRQName: pc|packageName
1028     @@ReflectCDATA:
1029 wakaba 1.1 @@enDesc:
1030     The fully-qualified package name.
1031     @@Get:
1032 wakaba 1.35 @@Set:
1033 wakaba 1.1
1034     @Method:
1035     @@Name: getSub
1036     @@enDesc:
1037     Gets a subroutine.
1038     @@Param:
1039     @@@Name: subName
1040 wakaba 1.36 @@@Type: DOMString
1041 wakaba 1.1 @@@enDesc:
1042     The name of subroutine to get.
1043     @@NamedParam:
1044     @@@Name: makeNewNode
1045 wakaba 1.36 @@@Type: idl|boolean||ManakaiDOM|all
1046 wakaba 1.1 @@@enDesc:
1047     Whether a new subroutine object should be created,
1048     if it is not exist, or not.
1049     @@Return:
1050 wakaba 1.25 @@@Type: PerlSub
1051 wakaba 1.1 @@@enDesc:
1052     The subroutine object.
1053 wakaba 1.4 @@@nullCase:
1054     @@@@enDesc:
1055     Either the specified subroutine is not found and
1056     the <P::makeNewNode> parameter is set to <DOM::false> or
1057     the subroutine is defined as an alias.
1058 wakaba 1.1 @@@PerlDef:
1059 wakaba 1.35 __DEEP{
1060     F: {
1061     for my $child (@{$self-><AG::Node.childNodes>}) {
1062     if ($child-><AG::Node.nodeType> == <C::Node.ELEMENT_NODE> and
1063     defined $child-><AG::Node.namespaceURI> and
1064     $child-><AG::Node.namespaceURI> eq <Q::pc:> and
1065     $child-><AG::Node.localName> eq 'sub') {
1066     if ($child-><M::PerlSub.hasPerlName> ($subName)) {
1067     $r = $child;
1068     last F;
1069     }
1070     }
1071     }
1072     if ($makeNewNode) {
1073     $r = $self-><AG::Node.ownerDocument>
1074     -><M::Document.createElementNS>
1075     (<Q::pc:>, 'sub');
1076     $r-><M::PerlSub.addPerlName> ($subName);
1077     $self-><M::Node.appendChild> ($r);
1078     }
1079     } # F
1080     }__;
1081 wakaba 1.1
1082 wakaba 1.4 @Method:
1083 wakaba 1.35 @@Name: setSubNode
1084     @@enDesc:
1085     Sets a subrotine.
1086     @@Param:
1087     @@@Name: subArg
1088     @@@Type: PerlSub
1089     @@@enDesc:
1090     The subroutine object.
1091     @@Return:
1092     @@@RaiseException:
1093     @@@@@:IN_USE_NODE_ERR
1094     @@@@enDesc:
1095     An attempt is made to set a subroutine that is
1096     already used elsewhere.
1097     @@@PerlDef:
1098     __DEEP{
1099     if ($subArg-><AG::Node.parentNode>) {
1100     __UNDEEP{__EXCEPTION{IN_USE_NODE_ERR::
1101     pc:childNode => {$subArg},
1102     }__}__;
1103     }
1104     $self-><AG::Node.ownerDocument>-><M::Document.adoptNode> ($subArg);
1105     $self-><M::Node.appendChild> ($subArg);
1106     }__;
1107    
1108     @Method:
1109 wakaba 1.4 @@Name: getOverloadSub
1110     @@enDesc:
1111     Gets an overloading subroutine.
1112     @@Param:
1113     @@@Name: opName
1114     @@@Type:
1115     DISLang:String::ManakaiDOM:all
1116     @@@enDesc:
1117     The name of the overloaded operator.
1118     @@NamedParam:
1119     @@@Name: makeNewNode
1120     @@@Type:
1121 wakaba 1.12 DOMMain:boolean::ManakaiDOM:all
1122 wakaba 1.4 @@@enDesc:
1123     Whether a new subroutine object should be created,
1124     if it is not exist, or not.
1125     @@Return:
1126 wakaba 1.25 @@@Type: PerlSub
1127 wakaba 1.4 @@@enDesc:
1128     The subroutine object.
1129     @@@nullCase:
1130     @@@@enDesc:
1131     Either the specified subroutine is not found and
1132     the <P::makeNewNode> parameter is set to <DOM::false> or
1133     the specified operator is overloaded by specifying method name.
1134     @@@UnknownOperatorException:
1135     @@@PerlDef:
1136 wakaba 1.35 unless (<Code::operatorNameList>->{$opName}) {
1137     __EXCEPTION{UNSUPPORTED_OPERATOR_ERR::
1138     pc:operator => {$opName},
1139     MDOMX:param-name => 'opName',
1140     }__;
1141     }
1142     __DEEP{
1143     F: {
1144     for my $child (@{$self-><AG::Node.childNodes>}) {
1145     if ($child-><AG::Node.nodeType> == <C::Node.ELEMENT_NODE> and
1146     defined $child-><AG::Node.namespaceURI> and
1147     $child-><AG::Node.namespaceURI> eq <Q::pc:> and
1148     $child-><AG::Node.localName> eq 'sub') {
1149     if ($child-><M::PerlSub.hasPerlOperator> ($opName)) {
1150     $r = $child;
1151     last F;
1152     }
1153     }
1154     }
1155     if ($makeNewNode) {
1156     $r = $self-><AG::Node.ownerDocument>
1157     -><M::Document.createElementNS>
1158     (<Q::pc:>, 'sub');
1159     $r-><M::PerlSub.addPerlOperator> ($opName);
1160     $self-><M::Node.appendChild> ($r);
1161     }
1162     } # F
1163     }__;
1164 wakaba 1.4
1165     @Method:
1166 wakaba 1.13 @@Name: addISAPackage
1167 wakaba 1.1 @@enDesc:
1168     Adds a class package that this class inherits.
1169     @@Param:
1170     @@@Name: packageName
1171 wakaba 1.35 @@@Type: DOMString
1172 wakaba 1.1 @@@enDesc:
1173     The name of package to add.
1174     @@Return:
1175     @@@PerlDef:
1176 wakaba 1.35 __DEEP{
1177     $self-><M::Element.setAttributeNS>
1178     (<Q::pc:>, 'pc:extends' =>
1179     join ' ', (split /\s+/, $self-><M::Element.getAttributeNS>
1180     (<Q::pc:>, 'extends')), $packageName);
1181     }__;
1182    
1183     @Method:
1184     @@Name: getISAPackageNameList
1185     @@enDesc:
1186     Returns a list of names of packages extended by the package.
1187     @@Return:
1188     @@@Type: DISPerl|ARRAY||ManakaiDOM|all
1189     @@@enDesc:
1190     An ordered snapshot list of superpackage names.
1191     @@@PerlDef:
1192     __DEEP{
1193     $r = [split /\s+/, $self-><M::Element.getAttributeNS>
1194     (<Q::pc:>, 'extends')];
1195     }__;
1196 wakaba 1.1
1197     @Method:
1198     @@Name: addImplementPackage
1199     @@enDesc:
1200     Adds a interface package that this class implements.
1201     @@Param:
1202     @@@Name: packageName
1203 wakaba 1.35 @@@Type: DOMString
1204 wakaba 1.1 @@@enDesc:
1205     The name of package to add.
1206     @@Return:
1207     @@@PerlDef:
1208 wakaba 1.35 __DEEP{
1209     __CODE{addNameListAttr::
1210     $node => {$self},
1211     $attrName => 'implements',
1212     $newName => {$packageName},
1213     }__;
1214     }__;
1215    
1216     @Method:
1217     @@Name: getImplementPackageNameList
1218     @@enDesc:
1219     Returns a list of names of packages implemented by the package.
1220     @@Return:
1221     @@@Type: DISPerl|ARRAY||ManakaiDOM|all
1222     @@@enDesc:
1223     An unordered snapshot list of interface packages.
1224     @@@PerlDef:
1225     __DEEP{
1226     __CODE{getNameListAttr::
1227     $node => {$self},
1228     $attrName => 'implements',
1229     $result => {$r},
1230     }__;
1231     }__;
1232 wakaba 1.1
1233     @ToStringMethod:
1234     @@Return:
1235 wakaba 1.35 @@@Type: DOMString
1236 wakaba 1.1 @@@enDesc:
1237     Perl code.
1238     @@@PerlDef:
1239 wakaba 1.35 __DEEP{
1240     my $file = $self-><AG::PerlCode.fileNode>;
1241    
1242     ## Package name
1243     my $pn = $self-><AG::PerlPackage.packageName>;
1244     $r .= q<package > . $pn . ";\n";
1245     $file-><AS::PerlFile.currentPackage> ($pn) if $file;
1246    
1247     ## Package version
1248     $r .= 'our $VERSION = '.
1249 wakaba 1.36 <ClassM::ManakaiPCImplementation.versionDateTime> (time).
1250 wakaba 1.35 ";\n";
1251    
1252     ## Inheritance
1253     my @isa = (@{$self-><M::PerlPackage.getISAPackageNameList>},
1254     sort {$a cmp $b} @{$self-><M::PerlPackage
1255     .getImplementPackageNameList>});
1256     if (@isa) {
1257     $r .= 'push our @ISA, ' .
1258 wakaba 1.36 <ClassM::ManakaiPCImplementation.perlList> (\@isa) .
1259 wakaba 1.35 ";\n";
1260     }
1261    
1262     ## Use'ing modules
1263     for my $pack (sort {$a cmp $b} @{$self-><M::PerlCode
1264     .getUsePerlModuleNameList>}) {
1265     $r .= 'use ' . $pack . ";\n";
1266     }
1267    
1268     my $cls = $self-><M::PerlCode.getUseCharClassNameList>;
1269     for my $pack (sort {$a cmp $b} keys %$cls) {
1270     $r .= 'use ' . $pack . ' ' .
1271 wakaba 1.36 <ClassM::ManakaiPCImplementation.perlList>
1272 wakaba 1.35 ([sort {$a cmp $b} grep {$cls->{$pack}->{$_}}
1273     keys %{$cls->{$pack}}]) . ";\n";
1274     }
1275    
1276     ## Package-scope objects
1277     my $has_bool;
1278     my $op = '';
1279     for my $child (@{$self-><AG::Node.childNodes>}) {
1280     if ($child-><AG::Node.nodeType> == <C::Node.ELEMENT_NODE> and
1281     defined $child-><AG::Node.namespaceURI> and
1282     $child-><AG::Node.namespaceURI> eq <Q::pc:>) {
1283     my $ln = $child-><AG::Node.localName>;
1284     if ($ln eq 'sub') {
1285     my $names = $child-><M::PerlSub.getPerlNameList>;
1286     my $ops = $child-><M::PerlSub.getPerlOperatorList>;
1287     if (@$names) {
1288     $r .= $child->stringify;
1289     if (@$names > 1) {
1290     $r .= sprintf q<*%s = \&%s;%s>,
1291     $_, $names->[0], "\n" for @$names[1..$#$names];
1292     }
1293     for (@$ops) {
1294     $op .= sprintf q['%s' => '%s', %s],
1295     $_ => $names->[0], "\n";
1296     $has_bool = true if $_ eq 'bool';
1297     }
1298     } else {
1299     my $v = $child->stringify;
1300     for (@$ops) {
1301     $op .= sprintf q['%s' => %s, %s], $_ => $v, "\n";
1302     $has_bool = true if $_ eq 'bool';
1303     }
1304     }
1305     } else {
1306     $r .= $child->stringify;
1307     }
1308     } # pc:*
1309     } # children
1310    
1311     if (length $op) {
1312     $r .= "use overload \n";
1313     $r .= "bool => sub () {1}, \n" unless $has_bool;
1314     $r .= $op . "fallback => 1;\n";
1315     }
1316    
1317     ## -- Exports
1318     my $xport = $self-><M::PerlPackage.getExportList>;
1319     if (map {values %$_} values %$xport) {
1320     $r .= q[our %EXPORT_TAG = (] .
1321 wakaba 1.36 <ClassM::ManakaiPCImplementation.perlList>
1322 wakaba 1.35 ([map {$_ => [sort {$a cmp $b} keys %{$xport->{$_}}]}
1323     sort {$a cmp $b} grep {length}
1324     keys %$xport]) . qq[);\n];
1325     $r .= q[our @EXPORT_OK = (] .
1326 wakaba 1.36 <ClassM::ManakaiPCImplementation.perlList>
1327 wakaba 1.35 ([map {sort {$a cmp $b} keys %{$xport->{$_}}}
1328     sort {$a cmp $b} keys %$xport]) . qq[);\n];
1329     $r .= q[use Exporter; push our @ISA, 'Exporter';] . qq[\n];
1330     }
1331     }__;
1332    
1333     @Method:
1334     @@Name: getExportList
1335     @@enDesc:
1336     Returns a list of export tag and names.
1337     @@Return:
1338     @@@Type: DISPerl|HASH||ManakaiDOM|all
1339     @@@enDesc:
1340     Snapshot list of lists.
1341     @@@PerlDef:
1342     my $mc;
1343     __DEEP{
1344     __CODE{getNameListAttr::
1345     $node => {$self},
1346     $attrName => 'export',
1347     $result => {$mc},
1348     }__;
1349     }__;
1350     for (@$mc) {
1351     my ($m, $c) = split /\./, $_, 2;
1352     $r->{$m}->{$c} = true;
1353     }
1354 wakaba 1.18
1355     @Method:
1356     @@Name: addExport
1357     @@enDesc:
1358 wakaba 1.26 Adds a name to the list of exported items (<Perl::@EXPORT_OK>).
1359 wakaba 1.18 @@Param:
1360     @@@Name: exportTag
1361 wakaba 1.35 @@@Type: DOMString
1362 wakaba 1.18 @@@enDesc:
1363     The name of the tag (without <CHAR::COLON> prefix).
1364     The <P::exportName> is added both to <Perl::@EXPORT_OK>
1365     and <Perl::$EXPORT_OK{<P::exportTag>}>.
1366     @@@nullCase:
1367     @@@@enDesc:
1368     The <P::exportName> is added only to the <Perl::@EXPORT_OK>.
1369     @@Param:
1370     @@@Name: exportName
1371 wakaba 1.35 @@@Type: DOMString
1372 wakaba 1.18 @@@enDesc:
1373     The name to be exported.
1374     @@Return:
1375     @@@PerlDef:
1376 wakaba 1.35 __DEEP{
1377     __CODE{addNameListAttr::
1378     $node => {$self},
1379     $attrName => 'export',
1380     $newName => {$exportTag.'.'.$exportName},
1381     }__;
1382     }__;
1383 wakaba 1.36 ##PCPackage
1384 wakaba 1.4
1385     ElementTypeBinding:
1386     @Name: UnknownOperatorException
1387     @ElementType:
1388     ManakaiDOM:raises
1389     @ShadowContent:
1390     @@@:UNSUPPORTED_OPERATOR_ERR
1391     @@enDesc:
1392     An attempt is made to overload an unknown operator.
1393    
1394     XParamDef:
1395     @QName:
1396     pc:operator
1397     @enDesc:
1398     An operator to overload.
1399    
1400     ResourceDef:
1401 wakaba 1.28 @For: ManakaiDOM|Perl
1402 wakaba 1.4 @QName: operatorNameList
1403     @enDesc:
1404     The list of valid operators for <PerlModule::operator> pragma.
1405 wakaba 1.36 @rdf:type: DISPerl|InlineCode
1406 wakaba 1.28 @PerlCDef:
1407 wakaba 1.4 {qw[
1408     + 1 - 1 * 1 / 1 % 1 ** 1 << 1 >> 1 x 1 . 1
1409     += 1 -= 1 *= 1 /= 1 %= 1 **= 1 <<= 1 >>= 1 x= 1 .= 1
1410     < 1 <= 1 > 1 >= 1 == 1 != 1 <=> 1
1411     lt 1 le 1 gt 1 ge 1 eq 1 ne 1 cmp 1
1412     & 1 | 1 ^ 1 neg 1 ! 1 ~ 1
1413     ++ 1 -- 1 = 1
1414     atan2 1 cos 1 sin 1 exp 1 abs 1 log 1 sqrt 1
1415     bool 1 "" 1 0+ 1 ${} 1 @{} 1 %{} 1 &{} 1 *{} 1 <> 1
1416     nomethod 1
1417     ]}
1418    
1419 wakaba 1.35 IFClsETDef:
1420 wakaba 1.25 @IFQName: PerlCodeStatements
1421 wakaba 1.35 @CQName: ManakaiPCCodeStatements
1422     @ETQName:
1423     @@@: pc|statementContainer
1424     @@ImplNote:
1425     @@@lang:en
1426     @@@@: Dummy.
1427 wakaba 1.25
1428     @IFISA: PerlCodeUnits
1429 wakaba 1.35 @CISA: ManakaiPCCodeUnits
1430 wakaba 1.36
1431 wakaba 1.1 @enDesc:
1432 wakaba 1.6 A base class for node types that contains zero or more
1433     statements and/or blocks.
1434 wakaba 1.1
1435 wakaba 1.35 @ATTR:
1436 wakaba 1.10 @@Name: sourceFile
1437 wakaba 1.35 @@ATTRQName: pc|sourceFile
1438 wakaba 1.10 @@enDesc:
1439     The source file name of this fragment.
1440 wakaba 1.35 @@ReflectCDATA:
1441 wakaba 1.10 @@Get:
1442     @@@enDesc:
1443     Any string identifying the source.
1444     @@@nullCase:
1445     @@@@enDesc: No source file name is set.
1446     @@Set:
1447     @@@nullCase:
1448     @@@@enDesc: No (or unknown) source file.
1449    
1450 wakaba 1.35 @ATTR:
1451 wakaba 1.10 @@Name: sourceLine
1452 wakaba 1.35 @@ATTRQName: pc|sourceLine
1453 wakaba 1.10 @@enDesc:
1454     Source file line number of the first line of this fragment.
1455 wakaba 1.35 @@ReflectCDATA:
1456 wakaba 1.10 @@Get:
1457     @@Set:
1458    
1459 wakaba 1.35 @ATTR:
1460 wakaba 1.1 @@Name: currentSourceFile
1461 wakaba 1.35 @@ATTRQName: pc|currentSourceFile
1462 wakaba 1.1 @@enDesc:
1463     The current source file name that is referred when
1464     a code fragment is added.
1465 wakaba 1.35 @@ReflectCDATA:
1466 wakaba 1.1 @@Get:
1467     @@@nullCase:
1468     @@@@enDesc: No source file name is set.
1469     @@Set:
1470     @@@nullCase:
1471     @@@@enDesc: No (or unknown) source file.
1472    
1473 wakaba 1.35 @ATTR:
1474 wakaba 1.1 @@Name: currentSourceLine
1475 wakaba 1.35 @@ATTRQName: pc|currentSourceLine
1476 wakaba 1.1 @@enDesc:
1477     The current line number in source file that is referred when
1478     a code fragment is added.
1479 wakaba 1.35 @@ReflectCDATA:
1480 wakaba 1.1 @@Get:
1481     @@Set:
1482    
1483     @Method:
1484 wakaba 1.5 @@Name: appendCodeFragment
1485     @@enDesc:
1486     Appends a <Class::ManakaiPerlCodeFragment> object.
1487     @@Param:
1488     @@@Name: codeArg
1489 wakaba 1.25 @@@Type: PerlCode
1490 wakaba 1.5 @@@enDesc:
1491     A code fragment object.
1492     @@Return:
1493     @@@RaiseException:
1494     @@@@@:BAD_CHILD_ERR
1495     @@@@enDesc:
1496     An attempt is made to append a child
1497     that is not a <Class::ManakaiPerlUnparsedCode>.
1498     @@@RaiseException:
1499     @@@@@:IN_USE_NODE_ERR
1500     @@@@enDesc:
1501     An attempt is made to append a node that is
1502     already used elsewhere.
1503     @@@PerlDef:
1504 wakaba 1.35 if ({
1505     unparsed => 1, if => 1, statement => 1, block => 1,
1506     blockContainer => true,
1507     inlineUnparsed => 1, variable => 1, tokens => 1, atom => 1,
1508     inlineContainer => 1, stringLiteral => 1, assignment => 1,
1509     }->{$codeArg-><AG::Node.localName>}) {
1510     if ($codeArg-><AG::Node.parentNode>) {
1511     __EXCEPTION{IN_USE_NODE_ERR::
1512     pc:childNode => {$codeArg},
1513     MDOMX:param-name => 'codeArg',
1514     }__;
1515     }
1516     __DEEP{
1517     $self-><AG::Node.ownerDocument>
1518     -><M::Document.adoptNode> ($codeArg);
1519     $self-><M::Node.appendChild> ($codeArg);
1520     }__;
1521     } else {
1522     __EXCEPTION{BAD_CHILD_ERR::
1523     pc:parentNode => {$self},
1524     pc:childNode => {$codeArg},
1525     MDOMX:param-name => 'codeArg',
1526     }__;
1527     }
1528 wakaba 1.5
1529     @Method:
1530 wakaba 1.1 @@Name: appendCode
1531     @@enDesc:
1532     Appends an unparsed Perl code fragment.
1533     @@Param:
1534     @@@Name: codeArg
1535 wakaba 1.35 @@@Type: DOMString
1536 wakaba 1.1 @@@enDesc:
1537     An unparsed Perl code fragment.
1538     @@Return:
1539 wakaba 1.25 @@@Type: PerlUnparsedCode
1540 wakaba 1.1 @@@enDesc:
1541     The newly created Perl code object.
1542     @@@PerlDef:
1543 wakaba 1.35 __DEEP{
1544     $r = $self-><AG::Node.ownerDocument>-><M::Document.createElementNS>
1545     (<Q::pc:>, 'unparsed');
1546     $r-><AS::Node.textContent> ($codeArg);
1547     $r-><AS::PerlCodeStatements.sourceFile>
1548     ($self-><AG::PerlCodeStatements.currentSourceFile>);
1549     my $sl = $self-><AG::PerlCodeStatements.currentSourceLine>;
1550     $r-><AS::PerlCodeStatements.sourceLine> ($sl);
1551     $self-><AG::PerlCodeStatements.currentSourceLine>
1552     ($sl + ($codeArg =~ tr/\x0A/\x0A/));
1553     $self-><M::Node.appendChild> ($r);
1554     }__;
1555 wakaba 1.1
1556     @Method:
1557     @@Name: skipLines
1558     @@enDesc:
1559     Skips lines in a code.
1560     @@Param:
1561     @@@Name: codeArg
1562 wakaba 1.35 @@@Type: DOMString
1563 wakaba 1.1 @@@enDesc:
1564     A code fragment, which is counted lines.
1565     @@Return:
1566     @@@PerlDef:
1567 wakaba 1.30 $self->{<H::mn:node>}->{<H::pc:currentSourceLine>}
1568 wakaba 1.1 += ($codeArg =~ tr/\x0A/\x0A/);
1569 wakaba 1.4
1570 wakaba 1.35 @ATTR:
1571 wakaba 1.8 @@Name: label
1572 wakaba 1.35 @@ATTRQName: pc|label
1573 wakaba 1.8 @@enDesc:
1574     Label for this block.
1575 wakaba 1.35 @@ReflectCDATA:
1576 wakaba 1.8 @@Get:
1577     @@@nullCase:
1578     @@@@enDesc:
1579     No label.
1580     @@Set:
1581     @@@nullCase:
1582     @@@@enDesc:
1583     No label.
1584    
1585     @Method:
1586     @@Name: appendBlock
1587     @@enDesc:
1588     Appends a Perl block code.
1589     @@Return:
1590 wakaba 1.25 @@@Type: PerlBlock
1591 wakaba 1.8 @@@enDesc:
1592     The newly created Perl code object.
1593     @@@PerlDef:
1594 wakaba 1.35 __DEEP{
1595     $r = $self-><AG::Node.ownerDocument>-><M::Document.createElementNS>
1596     (<Q::pc:>, 'block');
1597     $self-><M::Node.appendChild> ($r);
1598     }__;
1599 wakaba 1.8
1600     @Method:
1601     @@Name: appendStatement
1602     @@enDesc:
1603     Appends a Perl statement.
1604     @@Param:
1605     @@@Name: codeArg
1606 wakaba 1.36 @@@Type: DOMString
1607 wakaba 1.8 @@@enDesc:
1608     A Perl statement without terminating <Perl::;>.
1609     @@@nullCase:
1610     @@@@enDesc:
1611     No initial content.
1612     @@Return:
1613 wakaba 1.25 @@@Type: PerlStatement
1614 wakaba 1.8 @@@enDesc:
1615     The newly created Perl code object.
1616     @@@PerlDef:
1617 wakaba 1.35 __DEEP{
1618     $r = $self-><AG::Node.ownerDocument>-><M::Document.createElementNS>
1619     (<Q::pc:>, 'statement');
1620     if (defined $codeArg) {
1621     $r-><M::PerlCodeUnits.appendBare> ($codeArg);
1622     }
1623     $self-><M::Node.appendChild> ($r);
1624     }__;
1625 wakaba 1.12
1626     @Method:
1627     @@Name: appendNewIf
1628     @@enDesc:
1629     Appends a newly created <Class::ManakaiPerlIf> object.
1630     @@Param:
1631     @@@Name: conditionArg
1632 wakaba 1.25 @@@Type: PerlCode
1633 wakaba 1.12 @@@enDesc:
1634     Conditoon code fragment object.
1635     @@Param:
1636     @@@Name: trueArg
1637 wakaba 1.25 @@@Type: PerlCode
1638 wakaba 1.12 @@@enDesc:
1639     A true code fragment object.
1640     @@@nullCase:
1641     @@@@enDesc: No true code.
1642     @@Param:
1643     @@@Name: falseArg
1644 wakaba 1.25 @@@Type: PerlCode
1645 wakaba 1.12 @@@enDesc:
1646     A false code fragment object.
1647     @@@nullCase:
1648     @@@@enDesc: No false code.
1649     @@Return:
1650 wakaba 1.36 @@@Type: PerlIf
1651 wakaba 1.35 @@@enDesc:
1652     The newly created element.
1653 wakaba 1.12 @@@RaiseException:
1654     @@@@@:BAD_CHILD_ERR
1655     @@@@enDesc:
1656     An attempt is made to append a child
1657     that is not valid type.
1658     @@@RaiseException:
1659     @@@@@:IN_USE_NODE_ERR
1660     @@@@enDesc:
1661     An attempt is made to append a node that is
1662     already used elsewhere.
1663     @@@PerlDef:
1664 wakaba 1.35 for my $arg ([conditionArg => $conditionArg]) {
1665     if ({
1666     atom => 1, tokens => 1, inlineContainer => 1, assignment => true,
1667     inlineUnparsed => 1, variable => 1, stringLiteral => true,
1668     }->{$arg->[1]-><AG::Node.localName>}) {
1669     if ($arg->[1]-><AG::Node.parentNode>) {
1670     __EXCEPTION{IN_USE_NODE_ERR::
1671     pc:childNode => {$arg->[1]},
1672     MDOMX:param-name => {$arg->[0]},
1673     }__;
1674     }
1675     } else {
1676     __EXCEPTION{BAD_CHILD_ERR::
1677     pc:parentNode => {$self},
1678     pc:childNode => {$arg->[1]},
1679     MDOMX:param-name => {$arg->[0]},
1680     }__;
1681     }
1682     } # c
1683 wakaba 1.6
1684 wakaba 1.35 for my $arg ([trueArg => $trueArg],
1685     [falseArg => $falseArg]) {
1686     next unless $arg->[1];
1687     if ({
1688     blockContainer => true,
1689     }->{$arg->[1]-><AG::Node.localName>}) {
1690     if ($arg->[1]-><AG::Node.parentNode>) {
1691     __EXCEPTION{IN_USE_NODE_ERR::
1692     pc:childNode => {$arg->[1]},
1693     MDOMX:param-name => {$arg->[0]},
1694     }__;
1695     }
1696     } else {
1697     __EXCEPTION{BAD_CHILD_ERR::
1698     pc:parentNode => {$self},
1699     pc:childNode => {$arg->[1]},
1700     MDOMX:param-name => {$arg->[0]},
1701     }__;
1702     }
1703     } # t/f
1704    
1705     __DEEP{
1706     $r = $self-><AG::Node.ownerDocument>-><M::Document.createElementNS>
1707     (<Q::pc:>, 'if');
1708     $r-><AS::PerlIf.condition> ($conditionArg);
1709     $r-><AS::PerlIf.trueCode> ($trueArg) if $trueArg;
1710     $r-><AS::PerlIf.falseCode> ($falseArg) if $falseArg;
1711     $self-><M::Node.appendChild> ($r);
1712     }__;
1713     ##PCIf
1714    
1715     IFClsETDef:
1716 wakaba 1.25 @IFQName: PerlSub
1717 wakaba 1.35 @CQName: ManakaiPCSub
1718     @ETQName: pc|sub
1719 wakaba 1.25
1720     @IFISA: PerlCode
1721    
1722     @IFISA: PerlCodeStatements
1723 wakaba 1.35 @CISA: ManakaiPCCodeStatements
1724 wakaba 1.25
1725 wakaba 1.6 @enDesc:
1726 wakaba 1.36 Perl subroutines.
1727 wakaba 1.20
1728 wakaba 1.6 @Attr:
1729 wakaba 1.35 @@Name: pcLocalName
1730 wakaba 1.6 @@enDesc:
1731     The name of this subroutine.
1732 wakaba 1.35 @@Type: DOMString
1733 wakaba 1.6 @@Get:
1734     @@@nullCase:
1735     @@@@enDesc:
1736     This subroutine has no name.
1737 wakaba 1.35 @@@PerlDef:
1738     __DEEP{
1739     $r = $self-><M::PerlSub.getPerlNameList>->[0];
1740     }__;
1741 wakaba 1.6
1742 wakaba 1.35 @Method:
1743     @@Name: addPerlName
1744     @@enDesc:
1745     Adds a subroutine name.
1746     @@Param:
1747     @@@Name: subName
1748     @@@Type: DOMString
1749     @@@enDesc: The name to add.
1750     @@Return:
1751     @@@PerlDef:
1752     __DEEP{
1753     __CODE{addNameListAttr::
1754     $node => {$self},
1755     $attrName => 'localName',
1756     $newName => {$subName},
1757     }__;
1758     }__;
1759    
1760     @Method:
1761     @@Name: getPerlNameList
1762     @@enDesc:
1763     Returns a list of names of the subroutine.
1764     @@Return:
1765     @@@Type: DISPerl|ARRAY||ManakaiDOM|all
1766     @@@enDesc:
1767     An unordered snapshot list of names.
1768     @@@PerlDef:
1769     __DEEP{
1770     __CODE{getNameListAttr::
1771     $node => {$self},
1772     $attrName => 'localName',
1773     $result => {$r},
1774     }__;
1775     }__;
1776    
1777     @Method:
1778     @@Name: hasPerlName
1779     @@enDesc:
1780     Returns whether the subroutine has a name or not.
1781     @@Param:
1782     @@@Name: subName
1783     @@@Type: DOMString
1784     @@@enDesc: The name.
1785     @@Return:
1786     @@@Type: idl|boolean||ManakaiDOM|all
1787     @@@PerlDef:
1788     __DEEP{
1789     my $l;
1790     __CODE{getNameListAttr::
1791     $node => {$self},
1792     $attrName => 'localName',
1793     $result => {$l},
1794     }__;
1795     F: for (@$l) {
1796     if ($_ eq $subName) {
1797     $r = true;
1798     last F;
1799     }
1800     }
1801     }__;
1802    
1803     @Method:
1804     @@Name: addPerlOperator
1805     @@enDesc:
1806     Adds an operator overloaded by the method.
1807     @@Param:
1808     @@@Name: op
1809     @@@Type: DOMString
1810     @@@enDesc: The operator to add.
1811     @@Return:
1812     @@@PerlDef:
1813     __DEEP{
1814     __CODE{addNameListAttr::
1815     $node => {$self},
1816     $attrName => 'operator',
1817     $newName => {$op},
1818     }__;
1819     }__;
1820    
1821     @Method:
1822     @@Name: getPerlOperatorList
1823     @@enDesc:
1824     Returns a list of operators of the subroutine.
1825     @@Return:
1826     @@@Type: DISPerl|ARRAY||ManakaiDOM|all
1827     @@@enDesc:
1828     An unordered snapshot list of operators.
1829     @@@PerlDef:
1830     __DEEP{
1831     __CODE{getNameListAttr::
1832     $node => {$self},
1833     $attrName => 'operator',
1834     $result => {$r},
1835     }__;
1836     }__;
1837    
1838     @Method:
1839     @@Name: hasPerlOperator
1840     @@enDesc:
1841     Returns whether the subroutine has an operator or not.
1842     @@Param:
1843     @@@Name: op
1844     @@@Type: DOMString
1845     @@@enDesc: The operator.
1846     @@Return:
1847     @@@Type: idl|boolean||ManakaiDOM|all
1848     @@@PerlDef:
1849     __DEEP{
1850     my $l;
1851     __CODE{getNameListAttr::
1852     $node => {$self},
1853     $attrName => 'operator',
1854     $result => {$l},
1855     }__;
1856     F: for (@$l) {
1857     if ($_ eq $op) {
1858     $r = true;
1859     last F;
1860     }
1861     }
1862     }__;
1863    
1864     @ATTR:
1865 wakaba 1.6 @@Name: prototype
1866 wakaba 1.35 @@ATTRQName: pc|prototype
1867 wakaba 1.6 @@enDesc:
1868     The prototype of this subroutine.
1869 wakaba 1.35 @@ReflectCDATA:
1870 wakaba 1.6 @@Get:
1871     @@@nullCase:
1872     @@@@enDesc:
1873     No prototype is set.
1874     @@Set:
1875     @@@nullCase:
1876     @@@@enDesc:
1877     No prototype declaration.
1878    
1879 wakaba 1.4 @ToStringMethod:
1880     @@Return:
1881 wakaba 1.35 @@@Type: DOMString
1882 wakaba 1.4 @@@enDesc:
1883     Perl code.
1884     @@@PerlDef:
1885 wakaba 1.35 __DEEP{
1886     $r = q<sub>;
1887     my $nm = $self-><M::PerlSub.getPerlNameList>;
1888     $r .= q< > . $nm->[0] if @$nm;
1889     my $pt = $self-><AG::PerlSub.prototype>;
1890     $r .= q< (> . $pt . q<)> if length $pt;
1891     $r .= qq< {\n>;
1892     for my $child (@{$self-><AG::Node.childNodes>}) {
1893     $r .= $child->stringify;
1894     }
1895     $r .= qq<}\n>;
1896     }__;
1897 wakaba 1.14
1898     @NumValMethod:
1899     @@Return:
1900 wakaba 1.35 @@@Type: idl|unsignedLong||ManakaiDOM|all
1901 wakaba 1.14 @@@PerlDef:
1902 wakaba 1.35 __DEEP{
1903     $r = 0 + $self-><AG::Node.lastChild>;
1904     }__;
1905     ##PCSub
1906 wakaba 1.1
1907 wakaba 1.5 XParamDef:
1908     @QName: parentNode
1909     @enDesc:
1910     Parent node.
1911    
1912     XParamDef:
1913     @QName: childNode
1914     @enDesc:
1915     Child node.
1916    
1917 wakaba 1.35 IFClsETDef:
1918 wakaba 1.25 @IFQName: PerlUnparsedCode
1919 wakaba 1.35 @CQName: ManakaiPCUnparsedCode
1920     @ETQName: pc|unparsed
1921 wakaba 1.25
1922     @IFISA: PerlCode
1923 wakaba 1.35 @CISA: ManakaiPCCode
1924 wakaba 1.25
1925 wakaba 1.1 @enDesc:
1926     Unparsed Perl code fragments.
1927 wakaba 1.5
1928 wakaba 1.35 @ATTR:
1929 wakaba 1.5 @@Name: sourceFile
1930 wakaba 1.35 @@ATTRQName: pc|sourceFile
1931 wakaba 1.5 @@enDesc:
1932     The source file name of this fragment.
1933 wakaba 1.35 @@ReflectCDATA:
1934 wakaba 1.5 @@Get:
1935     @@@enDesc:
1936     Any string identifying the source.
1937     @@@nullCase:
1938     @@@@enDesc: No source file name is set.
1939     @@Set:
1940     @@@nullCase:
1941     @@@@enDesc: No (or unknown) source file.
1942    
1943 wakaba 1.35 @ATTR:
1944 wakaba 1.5 @@Name: sourceLine
1945 wakaba 1.35 @@ATTRQName: pc|sourceLine
1946 wakaba 1.5 @@enDesc:
1947     Source file line number of the first line of this fragment.
1948 wakaba 1.35 @@ReflectCDATA:
1949 wakaba 1.5 @@Get:
1950     @@Set:
1951 wakaba 1.6
1952     @ToStringMethod:
1953     @@Return:
1954 wakaba 1.35 @@@Type: DOMString
1955 wakaba 1.6 @@@enDesc:
1956     Perl code.
1957     @@@PerlDef:
1958 wakaba 1.35 __DEEP{
1959     $r = $self-><AG::Node.textContent>;
1960     my $file = $self-><AG::PerlCode.fileNode>;
1961     my $src_file = $file ? $file-><AG::PerlFile.sourceFile> : '';
1962     my $nxt_cnum = $file ? $file-><M::PerlFile.getNextChunkNumber> : 0;
1963     $r = sprintf qq<\n#line %d "%s [u] (Chunk #%d)"\n%s>.
1964     qq<\n#line 1 "%s [/u] (Chunk #%d)"\n>,
1965     $self-><AG::PerlUnparsedCode.sourceLine> || 1,
1966     $self-><AG::PerlUnparsedCode.sourceFile> || $src_file,
1967     $file ? $file-><M::PerlFile.getNextChunkNumber> : 0,
1968     $self-><AG::Node.textContent>,
1969     $src_file,
1970     $file ? $file-><M::PerlFile.getNextChunkNumber> : 0;
1971     }__;
1972 wakaba 1.1 ##PerlUnparsedCode
1973    
1974 wakaba 1.35 IFClsETDef:
1975 wakaba 1.25 @IFQName: PerlInlineUnparsedCode
1976 wakaba 1.35 @CQName: ManakaiPCInlineUnparsedCode
1977     @ETQName: pc|inlineUnparsed
1978 wakaba 1.25
1979     @IFISA: PerlCode
1980 wakaba 1.35 @CISA: ManakaiPCCode
1981 wakaba 1.25
1982 wakaba 1.6 @enDesc:
1983 wakaba 1.36 Unparsed Perl inline code fragments.
1984 wakaba 1.6
1985 wakaba 1.36 @ToStringMethod:
1986 wakaba 1.9 @@Return:
1987 wakaba 1.36 @@@Type: DOMString
1988     @@@enDesc:
1989     Perl code.
1990 wakaba 1.35 @@@disDef:
1991     @@@@DISPerl:cloneCode: DOMCore|ManakaiDOMNode.textContent.get
1992 wakaba 1.36 ##PCInlineUnparsedCode
1993 wakaba 1.6
1994 wakaba 1.35 IFClsETDef:
1995 wakaba 1.25 @IFQName: PerlStringLiteral
1996 wakaba 1.35 @CQName: ManakaiPCPerlStringLiteral
1997     @ETQName: pc|stringLiteral
1998 wakaba 1.25
1999     @IFISA: PerlCode
2000 wakaba 1.35 @CISA: ManakaiPCCode
2001 wakaba 1.25
2002 wakaba 1.6 @enDesc:
2003 wakaba 1.36 Perl string literal.
2004 wakaba 1.6
2005 wakaba 1.14 @NumValMethod:
2006     @@Return:
2007 wakaba 1.35 @@@Type: idl|unsignedLong||ManakaiDOM|all
2008 wakaba 1.14 @@@enDesc:
2009     Numeric value of the Perl code.
2010     @@@PerlDef:
2011 wakaba 1.35 __DEEP{
2012     $r = 0 + $self-><AG::Node.textContent>;
2013     }__;
2014 wakaba 1.14
2015 wakaba 1.6 @ToStringMethod:
2016     @@Return:
2017 wakaba 1.35 @@@Type: DOMString
2018 wakaba 1.6 @@@enDesc:
2019     Perl code.
2020     @@@PerlDef:
2021 wakaba 1.35 __DEEP{
2022     $r = $self-><AG::Node.textContent>;
2023     $r =~ s/(['\\])/\\$1/g;
2024     $r = q<'> . $r . q<'>;
2025     }__;
2026 wakaba 1.6 ##PerlStringLiteral
2027    
2028 wakaba 1.35 IFClsETDef:
2029 wakaba 1.25 @IFQName: PerlTokens
2030 wakaba 1.35 @CQName: ManakaiPCTokens
2031     @ETQName: pc|tokens
2032 wakaba 1.12
2033 wakaba 1.25 @IFISA: PerlCode
2034 wakaba 1.35 @CISA: ManakaiPCCode
2035 wakaba 1.25
2036 wakaba 1.6 @enDesc:
2037 wakaba 1.36 Unparsed Perl inline code fragments.
2038 wakaba 1.6
2039     @ToStringMethod:
2040     @@Return:
2041     @@@Type:
2042 wakaba 1.12 DISLang:String::ManakaiDOM:all
2043 wakaba 1.6 @@@enDesc:
2044     Perl code.
2045     @@@PerlDef:
2046 wakaba 1.35 __DEEP{
2047     $r = $self-><AG::Node.textContent>;
2048     }__;
2049     ##PCTokens
2050 wakaba 1.6
2051 wakaba 1.35 IFClsETDef:
2052 wakaba 1.25 @IFQName: PerlAtom
2053 wakaba 1.35 @CQName: ManakaiPCAtom
2054     @ETQName: pc|atom
2055 wakaba 1.25
2056     @IFISA: PerlCode
2057 wakaba 1.35 @CISA: ManakaiPCTokens
2058 wakaba 1.25
2059 wakaba 1.6 @enDesc:
2060     Unparsed Perl atomic code fragments (such as numeric literal).
2061    
2062 wakaba 1.14 @NumValMethod:
2063     @@Return:
2064 wakaba 1.35 @@@Type: idl|unsignedLong||ManakaiDOM|all
2065 wakaba 1.14 @@@enDesc:
2066     Numeric value of the Perl code.
2067     @@@PerlDef:
2068 wakaba 1.35 __DEEP{
2069     $r = 0 + $self-><AG::Node.textContent>;
2070     }__;
2071 wakaba 1.9
2072 wakaba 1.6 @ToStringMethod:
2073     @@Return:
2074 wakaba 1.35 @@@Type: DOMString
2075 wakaba 1.6 @@@enDesc:
2076     Perl code.
2077     @@@PerlDef:
2078 wakaba 1.35 __DEEP{
2079     $r = $self-><AG::Node.textContent>;
2080     }__;
2081 wakaba 1.6 ##PerlAtom
2082    
2083 wakaba 1.35 IFClsETDef:
2084 wakaba 1.25 @IFQName: PerlVariable
2085 wakaba 1.35 @CQName: ManakaiPCVariable
2086     @ETQName: pc|variable
2087 wakaba 1.25
2088     @IFISA: PerlCode
2089 wakaba 1.35 @CISA: ManakaiPCCode
2090 wakaba 1.25
2091 wakaba 1.6 @enDesc:
2092     Unparsed Perl variable.
2093     \
2094     {NOTE:: Future version of the implementation may
2095     support to specify array index or hash key.
2096     \
2097 wakaba 1.36 }
2098 wakaba 1.6
2099 wakaba 1.35 @ATTR:
2100 wakaba 1.6 @@Name: variableType
2101 wakaba 1.35 @@ATTRQName: pc|variableType
2102 wakaba 1.6 @@enDesc:
2103     Perl variable type (<CODE::$>, <CODE::@>, <CODE::%>,
2104     <CODE::&> or empty string).
2105 wakaba 1.35 @@ReflectCDATA:
2106 wakaba 1.6 @@Get:
2107     @@Set:
2108    
2109 wakaba 1.35 @ATTR:
2110 wakaba 1.6 @@Name: packageName
2111 wakaba 1.35 @@ATTRQName: pc|packageName
2112 wakaba 1.6 @@enDesc:
2113     The name of the package to which this variable belongs.
2114 wakaba 1.35 @@ReflectCDATA:
2115 wakaba 1.6 @@Get:
2116     @@@nullCase:
2117     @@@@enDesc:
2118     This package belongs to the current package or
2119     does not belong to any package.
2120     @@Set:
2121     @@@nullCase:
2122     @@@@enDesc:
2123     This package belongs to the current package or
2124     does not belong to any package.
2125    
2126 wakaba 1.35 @ATTR:
2127 wakaba 1.36 @@Name: pcLocalName
2128 wakaba 1.35 @@ATTRQName: pc|localName
2129 wakaba 1.6 @@enDesc:
2130     The local variable name.
2131 wakaba 1.35 @@ReflectCDATA:
2132 wakaba 1.6 @@Get:
2133     @@Set:
2134    
2135 wakaba 1.35 @ATTR:
2136 wakaba 1.6 @@Name: variableScope
2137 wakaba 1.35 @@ATTRQName: pc|variableScope
2138 wakaba 1.6 @@enDesc:
2139     Scope modifier (<CODE::my> or <CODE::our> or <CODE::local>).
2140 wakaba 1.35 @@ReflectCDATA:
2141 wakaba 1.6 @@Get:
2142     @@@nullCase:
2143     @@@@enDesc:
2144     This variable does not have scope modifier.
2145     @@Set:
2146     @@@nullCase:
2147     @@@@enDesc:
2148     This variable does not have scope modifier.
2149    
2150     @ToStringMethod:
2151     @@Return:
2152 wakaba 1.35 @@@Type: DOMString
2153 wakaba 1.6 @@@enDesc:
2154     Perl code.
2155     @@@PerlDef:
2156 wakaba 1.35 __DEEP{
2157     my $t = $self-><AG::PerlVariable.variableScope>;
2158     $r .= $t . ' ' if length $t;
2159     $r .= $self-><AG::PerlVariable.variableType>;
2160     my $v = $self-><AG::PerlVariable.packageName>;
2161     $r .= $v . '::' if length $v;
2162     $r .= $self-><AG::PerlVariable.pcLocalName>;
2163     $v = $self-><AG::PerlVariable.hashKey>;
2164     if ($t eq '$' and length $v) {
2165     $v =~ s/(['\\])/\\$1/g;
2166     $r .= q<{'> . $v . q<'}>;
2167     }
2168     }__;
2169 wakaba 1.6
2170 wakaba 1.35 @ATTR:
2171 wakaba 1.6 @@Name: hashKey
2172 wakaba 1.35 @@ATTRQName: pc|hashKey
2173 wakaba 1.6 @@enDesc:
2174     The key for hash.
2175     \
2176     {NOTE:: Using Perl code for key is not supported in the current
2177     version of the implementation.
2178     \
2179     }
2180 wakaba 1.35 @@ReflectCDATA:
2181 wakaba 1.6 @@Get:
2182     @@@nullCase:
2183     @@@@enDesc:
2184     This variable is not for hash value access.
2185     @@Set:
2186     @@@nullCase:
2187     @@@@enDesc:
2188     This variable is not for hash value access.
2189 wakaba 1.15 ##PerlVariable
2190 wakaba 1.6
2191 wakaba 1.25 IFClsDef:
2192     @IFQName: PerlCodeUnits
2193 wakaba 1.35 @CQName: ManakaiPCCodeUnits
2194 wakaba 1.25
2195 wakaba 1.35 @CISA: ManakaiPCCode
2196 wakaba 1.25
2197 wakaba 1.6 @enDesc:
2198     A base class implemented by both inline container and
2199     block-level container.
2200    
2201     @Attr:
2202     @@Name: length
2203     @@enDesc:
2204     The number of child code fragments.
2205 wakaba 1.35 @@Type: idl|unsignedLong||ManakaiDOM|all
2206 wakaba 1.6 @@Get:
2207     @@@PerlDef:
2208 wakaba 1.35 __DEEP{
2209     $r = @{$self-><AG::Node.childNodes>};
2210     }__;
2211 wakaba 1.6
2212     @Method:
2213     @@Name: appendStringLiteral
2214     @@enDesc:
2215     Appends a Perl string literal (<CODE::q>).
2216     @@Param:
2217     @@@Name: stringArg
2218 wakaba 1.35 @@@Type: DOMString
2219 wakaba 1.6 @@@enDesc:
2220     A string.
2221     @@Return:
2222 wakaba 1.35 @@@Type: PerlStringLiteral
2223 wakaba 1.6 @@@enDesc:
2224     The newly created Perl string literal object.
2225     @@@PerlDef:
2226 wakaba 1.35 __DEEP{
2227     $r = $self-><AG::Node.ownerDocument>-><M::Document.createElementNS>
2228     (<Q::pc:>, 'stringLiteral');
2229     $r-><AS::Node.textContent> ($stringArg);
2230     $self-><M::Node.appendChild> ($r);
2231     }__;
2232 wakaba 1.6
2233     @Method:
2234     @@Name: appendAtom
2235     @@enDesc:
2236     Appends a Perl atomic code fragment.
2237     @@Param:
2238     @@@Name: codeArg
2239 wakaba 1.35 @@@Type: DOMString
2240 wakaba 1.6 @@@enDesc:
2241     An atom.
2242     @@Return:
2243 wakaba 1.35 @@@Type: PerlAtom
2244 wakaba 1.6 @@@enDesc:
2245     The newly created Perl code object.
2246     @@@PerlDef:
2247 wakaba 1.35 __DEEP{
2248     $r = $self-><AG::Node.ownerDocument>-><M::Document.createElementNS>
2249     (<Q::pc:>, 'atom');
2250     $r-><AS::Node.textContent> ($codeArg);
2251     $self-><M::Node.appendChild> ($r);
2252     }__;
2253 wakaba 1.6
2254     @Method:
2255     @@Name: appendBare
2256     @@enDesc:
2257     Appends a Perl bare code fragment.
2258     @@Param:
2259     @@@Name: codeArg
2260 wakaba 1.35 @@@Type: DOMString
2261 wakaba 1.6 @@@enDesc:
2262 wakaba 1.7 An bare code.
2263 wakaba 1.6 @@Return:
2264 wakaba 1.35 @@@Type: PerlBare
2265 wakaba 1.6 @@@enDesc:
2266     The newly created Perl code object.
2267     @@@PerlDef:
2268 wakaba 1.35 __DEEP{
2269     $r = $self-><AG::Node.ownerDocument>-><M::Document.createElementNS>
2270     (<Q::pc:>, 'tokens');
2271     $r-><AS::Node.textContent> ($codeArg);
2272     $self-><M::Node.appendChild> ($r);
2273     }__;
2274 wakaba 1.11
2275     @Method:
2276     @@Name: appendNewAssignment
2277     @@enDesc:
2278     Appends a newly created <Class::ManakaiPerlAssign> object.
2279     @@Param:
2280     @@@Name: leftArg
2281 wakaba 1.35 @@@Type: PerlCode
2282 wakaba 1.11 @@@enDesc:
2283     A left hand side code fragment object.
2284     @@Param:
2285     @@@Name: rightArg
2286 wakaba 1.35 @@@Type: PerlCode
2287 wakaba 1.11 @@@enDesc:
2288     A right hand side code fragment object.
2289     @@Return:
2290 wakaba 1.36 @@@Type: PerlAssignment
2291 wakaba 1.11 @@@RaiseException:
2292     @@@@@:BAD_CHILD_ERR
2293     @@@@enDesc:
2294     An attempt is made to append a child
2295     that is not valid type.
2296     @@@RaiseException:
2297     @@@@@:IN_USE_NODE_ERR
2298     @@@@enDesc:
2299     An attempt is made to append a node that is
2300     already used elsewhere.
2301     @@@PerlDef:
2302 wakaba 1.35 for my $arg ([leftArg => $leftArg], [rightArg => $rightArg]) {
2303     if ({
2304     atom => 1, tokens => 1, inlineContainer => 1, assignment => true,
2305     inlineUnparsed => 1, variable => 1, stringLiteral => true,
2306     }->{$arg->[1]-><AG::Node.localName>}) {
2307     if ($arg->[1]-><AG::Node.parentNode>) {
2308     __EXCEPTION{IN_USE_NODE_ERR::
2309     pc:childNode => {$arg->[1]},
2310     MDOMX:param-name => {$arg->[0]},
2311     }__;
2312     }
2313     } else {
2314     __EXCEPTION{BAD_CHILD_ERR::
2315     pc:parentNode => {$self},
2316     pc:childNode => {$arg->[1]},
2317     MDOMX:param-name => {$arg->[0]},
2318     }__;
2319     }
2320     } # left/right
2321    
2322     __DEEP{
2323     $r = $self-><AG::Node.ownerDocument>-><M::Document.createElementNS>
2324     (<Q::pc:>, 'assignment');
2325     $r-><AS::PerlAssignment.leftCode> ($leftArg);
2326     $r-><AS::PerlAssignment.rightCode> ($rightArg);
2327     $self-><M::Node.appendChild> ($r);
2328     }__;
2329     ##PCAssignment
2330 wakaba 1.6
2331 wakaba 1.35 IFClsETDef:
2332 wakaba 1.25 @IFQName: PerlStatement
2333 wakaba 1.35 @CQName: ManakaiPCStatement
2334     @ETQName: pc|statement
2335 wakaba 1.25
2336     @IFISA: PerlCode
2337     @IFISA: PerlCodeInlines
2338 wakaba 1.35 @CISA: ManakaiPCCodeInlines
2339 wakaba 1.25
2340 wakaba 1.8 @enDesc:
2341 wakaba 1.36 Perl statements.
2342 wakaba 1.8
2343     @ToStringMethod:
2344     @@Return:
2345 wakaba 1.35 @@@Type: DOMString
2346 wakaba 1.8 @@@enDesc:
2347     Perl code.
2348     @@@PerlDef:
2349     $r = $self->SUPER::stringify;
2350 wakaba 1.16 $r .= ";\n" if length $r;
2351 wakaba 1.8 ##PerlStatement
2352 wakaba 1.6
2353 wakaba 1.35 IFClsETDef:
2354 wakaba 1.25 @IFQName: PerlCodeInlines
2355 wakaba 1.35 @CQName: ManakaiPCCodeInlines
2356     @ETQName: pc|inlineContainer
2357 wakaba 1.25
2358 wakaba 1.35 @CISA: ManakaiPCCodeUnits
2359 wakaba 1.25
2360 wakaba 1.6 @enDesc:
2361 wakaba 1.36 Unparsed Perl inline code block.
2362 wakaba 1.6
2363     @Method:
2364     @@Name: appendCodeFragment
2365     @@enDesc:
2366 wakaba 1.35 Appends a <IF::PerlCode> object.
2367 wakaba 1.6 @@Param:
2368     @@@Name: codeArg
2369 wakaba 1.25 @@@Type: PerlCode
2370 wakaba 1.6 @@@enDesc:
2371     A code fragment object.
2372     @@Return:
2373     @@@RaiseException:
2374     @@@@@:BAD_CHILD_ERR
2375     @@@@enDesc:
2376     An attempt is made to append a child
2377     that is not a <Class::ManakaiPerlUnparsedCode>.
2378     @@@RaiseException:
2379     @@@@@:IN_USE_NODE_ERR
2380     @@@@enDesc:
2381     An attempt is made to append a node that is
2382     already used elsewhere.
2383     @@@PerlDef:
2384 wakaba 1.35 if ({
2385     atom => 1, tokens => 1, inlineContainer => 1, assignment => true,
2386     inlineUnparsed => 1, variable => 1, stringLiteral => true,
2387     }->{$codeArg-><AG::Node.localName>}) {
2388     if ($codeArg-><AG::Node.parentNode>) {
2389     __EXCEPTION{IN_USE_NODE_ERR::
2390     pc:childNode => {$codeArg},
2391     }__;
2392     }
2393     __DEEP{
2394     $self-><AG::Node.ownerDocument>
2395     -><M::Document.adoptNode> ($codeArg);
2396     $self-><M::Node.appendChild> ($codeArg);
2397     }__;
2398     } else {
2399     __EXCEPTION{BAD_CHILD_ERR::
2400     pc:parentNode => {$self},
2401     pc:childNode => {$codeArg},
2402     }__;
2403     }
2404 wakaba 1.6
2405     @Method:
2406     @@Name: appendCode
2407     @@enDesc:
2408     Appends an unparsed Perl code fragment.
2409     @@Param:
2410     @@@Name: codeArg
2411 wakaba 1.35 @@@Type: DOMString
2412 wakaba 1.6 @@@enDesc:
2413     An unparsed Perl code fragment.
2414     @@Return:
2415 wakaba 1.25 @@@Type: PerlInlineUnparsedCode
2416 wakaba 1.6 @@@enDesc:
2417     The newly created Perl code object.
2418     @@@PerlDef:
2419 wakaba 1.35 __DEEP{
2420     $r = $self-><AG::Node.ownerDocument>-><M::Document.createElementNS>
2421     (<Q::pc:>, 'inlineUnparsed');
2422     $r-><AS::Node.textContent> ($codeArg);
2423     $self-><M::Node.appendChild> ($r);
2424     }__;
2425 wakaba 1.6
2426     @ToStringMethod:
2427     @@Return:
2428 wakaba 1.35 @@@Type: DOMString
2429 wakaba 1.6 @@@enDesc:
2430     Perl code.
2431     @@@PerlDef:
2432 wakaba 1.35 __DEEP{
2433     my @child = @{$self-><AG::Node.childNodes>};
2434     for my $child (@child) {
2435     if ($child-><AG::Node.namespaceURI> eq <Q::pc:> and
2436     $child-><AG::Node.localName> eq 'inlineContainer' and
2437     1 == @child) {
2438     $r .= '(' . $child->stringify . ')';
2439     } else {
2440     $r .= $child->stringify;
2441     }
2442     }
2443     }__;
2444     ##PCCodeInlines
2445 wakaba 1.6
2446 wakaba 1.35 IFClsETDef:
2447 wakaba 1.25 @IFQName: PerlBlock
2448 wakaba 1.35 @CQName: ManakaiPCBlock
2449     @ETQName: pc|block
2450 wakaba 1.25
2451     @IFISA: PerlCode
2452     @IFISA: PerlCodeStatements
2453 wakaba 1.35 @CISA: ManakaiPCCodeStatements
2454 wakaba 1.25
2455 wakaba 1.8 @enDesc:
2456 wakaba 1.36 Perl block-level code block.
2457 wakaba 1.8
2458     @ToStringMethod:
2459     @@Return:
2460 wakaba 1.35 @@@Type: DOMString
2461 wakaba 1.8 @@@enDesc:
2462     Perl code.
2463     @@@PerlDef:
2464 wakaba 1.35 my @child = @{$self-><AG::Node.childNodes>};
2465     if (@child == 1 and
2466     $child[0]-><AG::Node.localName> eq 'block') {
2467     $r = $child[0]->stringify;
2468     } elsif (@child == 1 and
2469     $child[0]-><AG::Node.localName> eq 'unparsed' and
2470     $child[0]-><AG::Node.textContent> =~ /^\s*$/) {
2471     #
2472     } else {
2473     for my $child (@child) {
2474     if ($child-><AG::Node.localName> eq 'inlineContainer' and
2475     1 == @child) {
2476     $r .= '(' . $child->stringify . ')';
2477     } else {
2478     $r .= $child->stringify;
2479     }
2480     }
2481    
2482     __DEEP{
2483     my $file = $self-><AG::PerlCode.fileNode>;
2484     my $sfile = $file ? $file-><AG::PerlFile.sourceFile> : '';
2485     $r = sprintf qq<\n{\n#line %d "%s [b] (Chunk #%d)"\n%s>.
2486     qq<\n#line 1 "%s [/b] (Chunk #%d)"\n}\n>,
2487     $self-><AG::PerlCodeStatements.sourceLine> || 1,
2488     $self-><AG::PerlCodeStatements.sourceFile> || $sfile,
2489     $file ? $file-><M::PerlFile.getNextChunkNumber> : 0,
2490     $r,
2491     $sfile,
2492     $file ? $file-><M::PerlFile.getNextChunkNumber> : 0
2493     if length $r;
2494     }__;
2495     }
2496     ##PCBlock
2497 wakaba 1.8
2498 wakaba 1.35 IFClsETDef:
2499 wakaba 1.25 @IFQName: PerlCodeBlocks
2500 wakaba 1.35 @CQName: ManakaiPCCodeBlocks
2501     @ETQName: pc|blockContainer
2502 wakaba 1.25
2503     @IFISA: PerlCodeStatements
2504 wakaba 1.35 @CISA: ManakaiPCCodeStatements
2505 wakaba 1.25
2506 wakaba 1.9 @enDesc:
2507     Perl block-level code container whose content may or may
2508     not semantically be self-contained.
2509    
2510     @ToStringMethod:
2511     @@Return:
2512 wakaba 1.35 @@@Type: DOMString
2513 wakaba 1.9 @@@enDesc:
2514     Perl code.
2515     @@@PerlDef:
2516 wakaba 1.35 my @child = @{$self-><AG::Node.childNodes>};
2517     if (@child == 1 and
2518     {
2519     block => true, blockContainer => true,
2520     }->{$child[0]-><AG::Node.localName>}) {
2521     $r = $child[0]->stringify;
2522     } else {
2523     for my $child (@child) {
2524     if ($child-><AG::Node.localName> eq 'inlineContainer' and
2525     1 == @child) {
2526     $r .= '(' . $child->stringify . ')';
2527     } else {
2528     $r .= $child->stringify;
2529     }
2530     }
2531 wakaba 1.9
2532 wakaba 1.35 __DEEP{
2533     my $file = $self-><AG::PerlCode.fileNode>;
2534     my $sfile = $file ? $file-><AG::PerlFile.sourceFile> : '';
2535     $r = sprintf qq<\n#line %d "%s [bc] (Chunk #%d)"\n%s>.
2536     qq<\n#line 1 "%s [/bc] (Chunk #%d)"\n>,
2537     $self-><AG::PerlCodeStatements.sourceLine> || 1,
2538     $self-><AG::PerlCodeStatements.sourceFile> || $sfile,
2539     $file ? $file-><M::PerlFile.getNextChunkNumber> : 0,
2540     $r,
2541     $sfile,
2542     $file ? $file-><M::PerlFile.getNextChunkNumber> : 0;
2543     }__;
2544     }
2545     ##PCCodeBlocks
2546    
2547     IFClsETDef:
2548 wakaba 1.25 @IFQName: PerlAssignment
2549 wakaba 1.35 @CQName: ManakaiPCAssignment
2550     @ETQName: pc|assignment
2551 wakaba 1.25
2552     @IFISA: PerlCode
2553 wakaba 1.35 @CISA: ManakaiPCCode
2554 wakaba 1.25
2555 wakaba 1.11 @enDesc:
2556 wakaba 1.36 Perl variable assignment.
2557 wakaba 1.11
2558     @ToStringMethod:
2559     @@Return:
2560 wakaba 1.35 @@@Type: DOMString
2561 wakaba 1.11 @@@enDesc:
2562     Perl code.
2563     @@@PerlDef:
2564 wakaba 1.35 __DEEP{
2565     $r = $self-><AG::PerlAssignment.leftCode>->stringify
2566     . ' = '
2567     . $self-><AG::PerlAssignment.rightCode>->stringify;
2568     }__;
2569    
2570     @Attr:
2571     @@Name: leftCode
2572     @@enDesc:
2573     Left-hand expression.
2574     @@Type: PerlCodeInlines
2575     @@Get:
2576     @@@nullCase:
2577     @@@@enDesc: Left-hand code not yet specified.
2578     @@@PerlDef:
2579     __DEEP{
2580     F: for my $child (@{$self-><AG::Node.childNodes>}) {
2581     if ($child-><AG::Node.namespaceURI> eq <Q::pc:> and
2582     $child-><AG::Node.localName> eq 'left') {
2583     $r = $child-><AG::Node.lastChild>;
2584     last F;
2585     }
2586     }
2587     }__;
2588     @@Set:
2589     @@@PerlDef:
2590     __DEEP{
2591     $self-><AG::Node.ownerDocument>-><M::Document.adoptNode> ($given);
2592     F: {
2593     for my $child (@{$self-><AG::Node.childNodes>}) {
2594     if ($child-><AG::Node.namespaceURI> eq <Q::pc:> and
2595     $child-><AG::Node.localName> eq 'left') {
2596     $child-><AS::Node.textContent> ('');
2597     $child-><M::Node.appendChild> ($given);
2598     last F;
2599     }
2600     }
2601     my $node = $self-><AG::Node.ownerDocument>
2602     -><M::Document.createElementNS>
2603     (<Q::pc:>, 'left');
2604     $node-><M::Node.appendChild> ($given);
2605     $self-><M::Node.appendChild> ($node);
2606     }
2607     }__;
2608    
2609     @Attr:
2610     @@Name: rightCode
2611     @@enDesc:
2612     Right-hand expression.
2613     @@Type: PerlCodeInlines
2614     @@Get:
2615     @@@nullCase:
2616     @@@@enDesc: Right-hand code not yet specified.
2617     @@@PerlDef:
2618     __DEEP{
2619     F: for my $child (@{$self-><AG::Node.childNodes>}) {
2620     if ($child-><AG::Node.namespaceURI> eq <Q::pc:> and
2621     $child-><AG::Node.localName> eq 'right') {
2622     $r = $child-><AG::Node.lastChild>;
2623     last F;
2624     }
2625     }
2626     }__;
2627     @@Set:
2628     @@@PerlDef:
2629     __DEEP{
2630     $self-><AG::Node.ownerDocument>-><M::Document.adoptNode> ($given);
2631     F: {
2632     for my $child (@{$self-><AG::Node.childNodes>}) {
2633     if ($child-><AG::Node.namespaceURI> eq <Q::pc:> and
2634     $child-><AG::Node.localName> eq 'right') {
2635     $child-><AS::Node.textContent> ('');
2636     $child-><M::Node.appendChild> ($given);
2637     last F;
2638     }
2639     }
2640     my $node = $self-><AG::Node.ownerDocument>
2641     -><M::Document.createElementNS>
2642     (<Q::pc:>, 'right');
2643     $node-><M::Node.appendChild> ($given);
2644     $self-><M::Node.appendChild> ($node);
2645     }
2646     }__;
2647 wakaba 1.11 ##PerlAssignment
2648    
2649 wakaba 1.35 IFClsETDef:
2650 wakaba 1.26 @IFQName: PerlIf
2651 wakaba 1.35 @CQName: ManakaiPCIf
2652     @ETQName: pc|if
2653 wakaba 1.25
2654     @IFISA: PerlCode
2655 wakaba 1.35 @CISA: ManakaiPCCode
2656 wakaba 1.25
2657 wakaba 1.12 @enDesc:
2658     Perl variable assignment.
2659    
2660     @ToStringMethod:
2661     @@Return:
2662 wakaba 1.35 @@@Type: DOMString
2663 wakaba 1.12 @@@enDesc:
2664     Perl code.
2665     @@@PerlDef:
2666 wakaba 1.35 __DEEP{
2667     my $tcode = $self-><AG::PerlIf.trueCode>;
2668     my $fcode = $self-><AG::PerlIf.falseCode>;
2669     my $ccode = $self-><AG::PerlIf.condition>;
2670     if (defined $tcode) {
2671     if (defined $fcode) {
2672     $r = q<if (> . $ccode->stringify . q<) {> . $tcode->stringify .
2673     q<} else {> . $fcode->stringify . qq<}\n>;
2674     } else {
2675 wakaba 1.36 $r = q<if (> . $ccode->stringify . q<) {> . $tcode->stringify .
2676 wakaba 1.35 qq<}\n>;
2677     }
2678     } else {
2679     $r = q<unless (> . $ccode->stringify . q<) {> . $fcode->stringify .
2680     qq<}\n>;
2681     }
2682     }__;
2683    
2684     @Attr:
2685     @@Name: condition
2686     @@enDesc:
2687     Condition expression.
2688     @@Type: PerlCodeInlines
2689     @@Get:
2690     @@@nullCase:
2691     @@@@enDesc: Condition code not yet specified.
2692     @@@PerlDef:
2693     __DEEP{
2694     F: for my $child (@{$self-><AG::Node.childNodes>}) {
2695     if ($child-><AG::Node.namespaceURI> eq <Q::pc:> and
2696     $child-><AG::Node.localName> eq 'condition') {
2697     $r = $child-><AG::Node.lastChild>;
2698     last F;
2699     }
2700     }
2701     }__;
2702     @@Set:
2703     @@@PerlDef:
2704     __DEEP{
2705     $self-><AG::Node.ownerDocument>-><M::Document.adoptNode> ($given);
2706     F: {
2707     for my $child (@{$self-><AG::Node.childNodes>}) {
2708     if ($child-><AG::Node.namespaceURI> eq <Q::pc:> and
2709     $child-><AG::Node.localName> eq 'condition') {
2710     $child-><AS::Node.textContent> ('');
2711     $child-><M::Node.appendChild> ($given);
2712     last F;
2713     }
2714     }
2715     my $node = $self-><AG::Node.ownerDocument>
2716     -><M::Document.createElementNS>
2717     (<Q::pc:>, 'condition');
2718     $node-><M::Node.appendChild> ($given);
2719     $self-><M::Node.appendChild> ($node);
2720     }
2721     }__;
2722    
2723     @Attr:
2724     @@Name: trueCode
2725     @@enDesc:
2726     True-case code.
2727     @@Type: PerlCodeBlocks
2728     @@Get:
2729     @@@nullCase:
2730     @@@@enDesc: True-case code not yet specified.
2731     @@@PerlDef:
2732     __DEEP{
2733     F: for my $child (@{$self-><AG::Node.childNodes>}) {
2734     if ($child-><AG::Node.namespaceURI> eq <Q::pc:> and
2735     $child-><AG::Node.localName> eq 'tr'.'ue') {
2736     $r = $child-><AG::Node.lastChild>;
2737     last F;
2738     }
2739     }
2740     }__;
2741     @@Set:
2742     @@@PerlDef:
2743     __DEEP{
2744     $self-><AG::Node.ownerDocument>-><M::Document.adoptNode> ($given);
2745     F: {
2746     for my $child (@{$self-><AG::Node.childNodes>}) {
2747     if ($child-><AG::Node.namespaceURI> eq <Q::pc:> and
2748     $child-><AG::Node.localName> eq 'tr'.'ue') {
2749     $child-><AS::Node.textContent> ('');
2750     $child-><M::Node.appendChild> ($given);
2751     last F;
2752     }
2753     }
2754     my $node = $self-><AG::Node.ownerDocument>
2755     -><M::Document.createElementNS>
2756     (<Q::pc:>, 'tr'.'ue');
2757     $node-><M::Node.appendChild> ($given);
2758     $self-><M::Node.appendChild> ($node);
2759     }
2760     }__;
2761    
2762     @Attr:
2763     @@Name: falseCode
2764     @@enDesc:
2765     False-case code.
2766     @@Type: PerlCodeBlocks
2767     @@Get:
2768     @@@nullCase:
2769     @@@@enDesc: True-case code not yet specified.
2770     @@@PerlDef:
2771     __DEEP{
2772     F: for my $child (@{$self-><AG::Node.childNodes>}) {
2773     if ($child-><AG::Node.namespaceURI> eq <Q::pc:> and
2774     $child-><AG::Node.localName> eq 'fal'.'se') {
2775     $r = $child-><AG::Node.lastChild>;
2776     last F;
2777     }
2778     }
2779     }__;
2780     @@Set:
2781     @@@PerlDef:
2782     __DEEP{
2783     $self-><AG::Node.ownerDocument>-><M::Document.adoptNode> ($given);
2784     F: {
2785     for my $child (@{$self-><AG::Node.childNodes>}) {
2786     if ($child-><AG::Node.namespaceURI> eq <Q::pc:> and
2787     $child-><AG::Node.localName> eq 'fal'.'se') {
2788     $child-><AS::Node.textContent> ('');
2789     $child-><M::Node.appendChild> ($given);
2790     last F;
2791     }
2792     }
2793     my $node = $self-><AG::Node.ownerDocument>
2794     -><M::Document.createElementNS>
2795     (<Q::pc:>, 'fal'.'se');
2796     $node-><M::Node.appendChild> ($given);
2797     $self-><M::Node.appendChild> ($node);
2798     }
2799     }__;
2800 wakaba 1.12 ##PerlIf
2801    
2802     PropDef:
2803     @QName:condition
2804     @enDesc:
2805     Condition.
2806     PropDef:
2807     @QName:true
2808     @enDesc:
2809     If true.
2810     PropDef:
2811     @QName:false
2812     @enDesc:
2813     If false.
2814    
2815 wakaba 1.11 PropDef:
2816     @QName:left
2817     @FullName:
2818     @@lang:en
2819     @@@: Left hand side
2820     PropDef:
2821     @QName:right
2822     @FullName:
2823     @@lang:en
2824     @@@: Right hand side
2825    
2826 wakaba 1.8 PropDef:
2827     @QName:label
2828     @enDesc:
2829     Perl statement / block label.
2830    
2831 wakaba 1.6 ElementTypeBinding:
2832     @Name: RaiseException
2833     @ElementType:
2834     ManakaiDOM:raises
2835    
2836 wakaba 1.25 IFClsDef:
2837     @IFQName: PCImplementation
2838 wakaba 1.35 @CQName: ManakaiPCImplementation
2839 wakaba 1.25
2840 wakaba 1.1 @enDesc:
2841     The class that provides factory methods.
2842 wakaba 1.20
2843 wakaba 1.35 @CISA: DOMCore|ManakaiDOMImplementation||ManakaiDOM|ManakaiDOMLatest
2844     @CISA: dx|ManakaiDefaultExceptionHandler||ManakaiDOM|Perl
2845 wakaba 1.17
2846 wakaba 1.35 @f:provides: pc|CoreFeature10
2847 wakaba 1.1
2848     @Method:
2849     @@Name: createPerlFile
2850     @@enDesc:
2851     Creates a Perl code file.
2852     @@Return:
2853 wakaba 1.25 @@@Type: PerlFile
2854 wakaba 1.1 @@@enDesc: A newly created Perl source file object.
2855     @@@PerlDef:
2856 wakaba 1.35 __DEEP{
2857     $r = $self-><M::DOMImpl.createDocument> (<Q::pc:>, 'file')
2858     -><AG::Document.documentElement>;
2859     }__;
2860 wakaba 1.1
2861 wakaba 1.13 @Method:
2862     @@Name: createPerlPackage
2863     @@enDesc:
2864     Creates a new package scope block.
2865     @@Param:
2866     @@@Name: packageName
2867 wakaba 1.35 @@@Type: DOMString
2868 wakaba 1.13 @@@enDesc:
2869     The fully-qualified name of the package to create.
2870     @@Return:
2871 wakaba 1.25 @@@Type: PerlPackage
2872 wakaba 1.13 @@@enDesc:
2873     The newly created package scope object.
2874     @@@PerlDef:
2875 wakaba 1.35 __DEEP{
2876     $r = $self-><M::DOMImpl.createDocument>
2877     -><M::Document.createElementNS> (<Q::pc:>, 'package');
2878     $r-><AS::PerlPackage.packageName> ($packageName);
2879     }__;
2880 wakaba 1.13
2881 wakaba 1.1 @IntMethod:
2882 wakaba 1.25 @@ForCheck: ManakaiDOM|ForClass
2883 wakaba 1.1 @@Name: perlComment
2884     @@ManakaiDOM:isStatic:1
2885     @@enDesc:
2886     Generates a Perl comment string.
2887     @@Param:
2888     @@@Name: str
2889 wakaba 1.35 @@@Type: DOMString
2890 wakaba 1.1 @@@enDesc:
2891     A comment text.
2892     @@Return:
2893 wakaba 1.35 @@@Type: DOMString
2894 wakaba 1.1 @@@enDesc:
2895     A Perl comment string.
2896     @@@PerlDef:
2897     $r = $str;
2898     $r =~ s/\n/\n## /g;
2899     $r =~ s/\n## $/\n/s;
2900     $r .= "\n" unless $r =~ /\n$/;
2901     $r = q<## > . $r;
2902    
2903     @IntMethod:
2904 wakaba 1.25 @@ForCheck: ManakaiDOM|ForClass
2905 wakaba 1.1 @@Name: rfc3339DateTime
2906     @@ManakaiDOM:isStatic:1
2907     @@enDesc:
2908     Returns RFC 3339 <CODE::date-time> representation of a date.
2909     @@Param:
2910     @@@Name: perlDate
2911 wakaba 1.35 @@@Type: idl|unsignedLong||ManakaiDOM|all
2912 wakaba 1.1 @@@enDesc:
2913     A Perl representation of date.
2914     @@Return:
2915 wakaba 1.35 @@@Type: DOMString
2916 wakaba 1.1 @@@enDesc:
2917     RFC 3339 date string.
2918     @@@PerlDef:
2919     my @time = gmtime $perlDate;
2920     $r = sprintf q<%04d-%02d-%02dT%02d:%02d:%02d+00:00>,
2921     $time[5] + 1900, $time[4] + 1, @time[3,2,1,0];
2922    
2923     @IntMethod:
2924 wakaba 1.25 @@ForCheck: ManakaiDOM|ForClass
2925 wakaba 1.1 @@Name: versionDateTime
2926     @@ManakaiDOM:isStatic:1
2927     @@enDesc:
2928     Returns date for version.
2929     @@Param:
2930     @@@Name: perlDate
2931 wakaba 1.35 @@@Type: idl|unsignedLong||ManakaiDOM|all
2932 wakaba 1.1 @@@enDesc:
2933     A Perl representation of date.
2934     @@Return:
2935 wakaba 1.35 @@@Type: DOMString
2936 wakaba 1.1 @@@enDesc:
2937     A Perl number literal.
2938     @@@PerlDef:
2939     my @time = gmtime $perlDate;
2940     $r = sprintf q<%04d%02d%02d.%02d%02d>,
2941     $time[5] + 1900, $time[4] + 1, @time[3,2,1];
2942    
2943     @Method:
2944     @@Name: perlLiteral
2945     @@enDesc:
2946     Perl code representation.
2947     @@Param:
2948     @@@Name: val
2949 wakaba 1.35 @@@Type: DISPerl|Any||ManakaiDOM|all
2950 wakaba 1.1 @@@enDesc:
2951     A Perl value.
2952     @@Return:
2953 wakaba 1.35 @@@Type: DOMString
2954 wakaba 1.1 @@@enDesc:
2955     A Perl lexical representation of <P::val>.
2956     @@@PerlDef:
2957     unless (defined $val) {
2958     $r = q<undef>;
2959     } elsif (ref $val eq 'ARRAY') {
2960     __DEEP{
2961 wakaba 1.36 $r = q<[> . <ClassM::ManakaiPCImplementation
2962 wakaba 1.14 .perlList> ($val) . q<]>;
2963 wakaba 1.1 }__;
2964     } elsif (ref $val eq 'HASH') {
2965     __DEEP{
2966 wakaba 1.31 $r = q<{>
2967 wakaba 1.36 . <ClassM::ManakaiPCImplementation.perlList>
2968 wakaba 1.31 ([map {$_ => $val->{$_}} sort {$a cmp $b} keys %$val])
2969     . q<}>;
2970 wakaba 1.1 }__;
2971     } else {
2972     $val =~ s/(['\\])/\\$1/g;
2973     $r = q<'> . $val . q<'>;
2974     }
2975    
2976     @Method:
2977     @@Name: perlList
2978     @@enDesc:
2979     Perl code representation of a list.
2980     @@Param:
2981     @@@Name: val
2982 wakaba 1.35 @@@Type: DISPerl|ARRAY||ManakaiDOM|all
2983 wakaba 1.1 @@@enDesc:
2984     A Perl array reference.
2985     @@Return:
2986 wakaba 1.35 @@@Type: DOMString
2987 wakaba 1.1 @@@enDesc:
2988     A Perl lexical representation of <CODE::@$val>.
2989     @@@PerlDef:
2990     __DEEP{
2991 wakaba 1.36 $r = join (q<, >, map {<ClassM::ManakaiPCImplementation
2992 wakaba 1.1 .perlLiteral> ($_)} @{$val});
2993     }__;
2994 wakaba 1.5
2995     @Method:
2996     @@Name: createPerlSub
2997     @@enDesc:
2998 wakaba 1.35 Creates a new <IF::PerlSub> object.
2999 wakaba 1.5 @@Param:
3000     @@@Name: subName
3001 wakaba 1.35 @@@Type: DOMString
3002 wakaba 1.5 @@@enDesc:
3003     The name of the subroutine to create.
3004     @@@nullCase:
3005     @@@@enDesc:
3006     The subroutine created has no name.
3007     @@Return:
3008 wakaba 1.25 @@@Type: PerlSub
3009 wakaba 1.5 @@@enDesc:
3010     Newly created Perl subroutine object.
3011     @@@PerlDef:
3012 wakaba 1.35 __DEEP{
3013     $r = $self-><M::DOMImpl.createDocument>
3014     -><M::Document.createElementNS> (<Q::pc:>, 'sub');
3015     $r-><M::PerlSub.addPerlName> ($subName) if defined $subName;
3016     }__;
3017 wakaba 1.5
3018     @Method:
3019     @@Name: createPerlUnparsedCode
3020     @@enDesc:
3021     Creates a new <Class::ManakaiPerlUnparsedCode> object.
3022     @@Param:
3023     @@@Name: codeArg
3024 wakaba 1.35 @@@Type: DOMString
3025 wakaba 1.5 @@@enDesc:
3026     The code fragment.
3027     @@@nullCase:
3028     @@@@enDesc:
3029     The fragment initially has no code.
3030     @@Return:
3031 wakaba 1.25 @@@Type: PerlUnparsedCode
3032 wakaba 1.5 @@@enDesc:
3033     Newly created Perl code object.
3034     @@@PerlDef:
3035 wakaba 1.35 __DEEP{
3036     $r = $self-><M::DOMImpl.createDocument>
3037     -><M::Document.createElementNS> (<Q::pc:>, 'unparsed');
3038     $r-><AS::Node.textContent> ($codeArg) if defined $codeArg;
3039     }__;
3040 wakaba 1.6
3041     @Method:
3042     @@Name: createPerlInlineContainer
3043     @@enDesc:
3044 wakaba 1.35 Creates a new <IF::PerlInlineContainer> object.
3045 wakaba 1.6 @@Return:
3046 wakaba 1.25 @@@Type: PerlCodeInlines
3047 wakaba 1.6 @@@enDesc:
3048     Newly created Perl code object.
3049     @@@PerlDef:
3050 wakaba 1.35 __DEEP{
3051     $r = $self-><M::DOMImpl.createDocument>
3052     -><M::Document.createElementNS> (<Q::pc:>, 'inlineContainer');
3053     }__;
3054 wakaba 1.6
3055     @Method:
3056     @@Name: createPerlInlineUnparsedCode
3057     @@enDesc:
3058 wakaba 1.35 Creates a new <IF::PerlInlineUnparsedCode> object.
3059 wakaba 1.6 @@Param:
3060     @@@Name: codeArg
3061 wakaba 1.35 @@@Type: DOMString
3062 wakaba 1.6 @@@enDesc:
3063     The code fragment.
3064     @@@nullCase:
3065     @@@@enDesc:
3066     The fragment initially has no code.
3067     @@Return:
3068 wakaba 1.25 @@@Type: PerlInlineUnparsedCode
3069 wakaba 1.6 @@@enDesc:
3070     Newly created Perl code object.
3071     @@@PerlDef:
3072 wakaba 1.35 __DEEP{
3073     $r = $self-><M::DOMImpl.createDocument>
3074     -><M::Document.createElementNS> (<Q::pc:>, 'inlineUnparsed');
3075     $r-><AS::Node.textContent> ($codeArg) if defined $codeArg;
3076     }__;
3077 wakaba 1.6
3078     @Method:
3079     @@Name: createPerlBare
3080     @@enDesc:
3081 wakaba 1.35 Creates a new <IF::PerlTokens> object.
3082 wakaba 1.6 @@Param:
3083     @@@Name: codeArg
3084 wakaba 1.35 @@@Type: DOMString
3085 wakaba 1.6 @@@enDesc:
3086     The code fragment.
3087     @@Return:
3088 wakaba 1.25 @@@Type: PerlTokens
3089 wakaba 1.6 @@@enDesc:
3090     Newly created Perl code object.
3091     @@@PerlDef:
3092 wakaba 1.35 __DEEP{
3093     $r = $self-><M::DOMImpl.createDocument>
3094     -><M::Document.createElementNS> (<Q::pc:>, 'tokens');
3095     $r-><AS::Node.textContent> ($codeArg) if defined $codeArg;
3096     }__;
3097 wakaba 1.6
3098     @Method:
3099     @@Name: createPerlAtom
3100     @@enDesc:
3101 wakaba 1.35 Creates a new <IF::PerlAtom> object.
3102 wakaba 1.6 @@Param:
3103     @@@Name: codeArg
3104 wakaba 1.35 @@@Type: DOMString
3105 wakaba 1.6 @@@enDesc:
3106     The code fragment.
3107     @@Return:
3108 wakaba 1.25 @@@Type: PerlAtom
3109 wakaba 1.6 @@@enDesc:
3110     Newly created Perl code object.
3111     @@@PerlDef:
3112 wakaba 1.35 __DEEP{
3113     $r = $self-><M::DOMImpl.createDocument>
3114     -><M::Document.createElementNS> (<Q::pc:>, 'atom');
3115     $r-><AS::Node.textContent> ($codeArg) if defined $codeArg;
3116     }__;
3117 wakaba 1.6
3118     @Method:
3119     @@Name: createPerlStringLiteral
3120     @@enDesc:
3121 wakaba 1.35 Creates a new <IF::PerlStringLiteral> object.
3122 wakaba 1.6 @@Param:
3123     @@@Name: stringArg
3124 wakaba 1.35 @@@Type: DOMString
3125 wakaba 1.6 @@@enDesc: A string.
3126     @@Return:
3127 wakaba 1.25 @@@Type: PerlStringLiteral
3128 wakaba 1.6 @@@enDesc:
3129     Newly created Perl code object.
3130     @@@PerlDef:
3131 wakaba 1.35 __DEEP{
3132     $r = $self-><M::DOMImpl.createDocument>
3133     -><M::Document.createElementNS> (<Q::pc:>, 'stringLiteral');
3134     $r-><AS::Node.textContent> ($stringArg);
3135     }__;
3136 wakaba 1.6
3137     @Method:
3138     @@Name: createPerlVariable
3139     @@enDesc:
3140 wakaba 1.35 Creates a new <IF::PerlVariable> object.
3141 wakaba 1.6 @@Param:
3142     @@@Name: variableType
3143 wakaba 1.35 @@@Type: DOMString
3144 wakaba 1.6 @@@enDesc:
3145     Variable prefix.
3146 wakaba 1.16 @@@nullCase:
3147     @@@@enDesc:
3148     If the <P::packageName> is <DOM::null>, then
3149     the <P::variableType> is detected by the prefix of
3150     <P::localName>. Otherwise, it is an unprefixed variable
3151     such as file handle.
3152 wakaba 1.6 @@Param:
3153     @@@Name: packageName
3154 wakaba 1.35 @@@Type: DOMString
3155 wakaba 1.6 @@@enDesc:
3156     Package name.
3157     @@@nullCase:
3158     @@@@enDesc:
3159     The variable belongs to the current package or a
3160     lexical-scoped variable.
3161     @@Param:
3162     @@@Name: localName
3163 wakaba 1.35 @@@Type: DOMString
3164 wakaba 1.6 @@@enDesc:
3165 wakaba 1.16 Variable name. If both <P::variableType> and <P::packageName>
3166     is <DOM::null>, the <P::localName> value may be prefixed
3167     by any possible <P::variableType> value.
3168 wakaba 1.6 @@Return:
3169 wakaba 1.25 @@@Type: PerlVariable
3170 wakaba 1.6 @@@enDesc:
3171     Newly created Perl variable object.
3172     @@@PerlDef:
3173 wakaba 1.35 __DEEP{
3174     $r = $self-><M::DOMImpl.createDocument>
3175     -><M::Document.createElementNS> (<Q::pc:>, 'variable');
3176     if (not $variableType and not $packageName and
3177     $localName =~ s/^(\\?[\$\@%&*])//) {
3178     $variableType = $1;
3179     }
3180     $r-><AS::PerlVariable.variableType> ($variableType)
3181     if defined $variableType;
3182     $r-><AS::PerlVariable.packageName> ($packageName)
3183     if defined $packageName;
3184     $r-><AS::PerlVariable.pcLocalName> ($localName);
3185     }__;
3186 wakaba 1.8
3187     @Method:
3188     @@Name: createPerlBlock
3189     @@enDesc:
3190 wakaba 1.35 Creates a new <IF::PerlBlock> object.
3191 wakaba 1.8 @@Return:
3192 wakaba 1.25 @@@Type: PerlBlock
3193 wakaba 1.8 @@@enDesc:
3194     Newly created Perl code object.
3195     @@@PerlDef:
3196 wakaba 1.35 __DEEP{
3197     $r = $self-><M::DOMImpl.createDocument>
3198     -><M::Document.createElementNS> (<Q::pc:>, 'block');
3199     }__;
3200 wakaba 1.9
3201     @Method:
3202     @@Name: createPerlBlockContainer
3203     @@enDesc:
3204     Creates a new <Class::ManakaiPerlBlockContainer> object.
3205     @@Return:
3206 wakaba 1.25 @@@Type: PerlCodeBlocks
3207 wakaba 1.9 @@@enDesc:
3208     Newly created Perl code object.
3209     @@@PerlDef:
3210 wakaba 1.35 __DEEP{
3211     $r = $self-><M::DOMImpl.createDocument>
3212     -><M::Document.createElementNS> (<Q::pc:>, 'blockContainer');
3213     }__;
3214 wakaba 1.11
3215     @Method:
3216     @@Name: createPerlStatement
3217     @@enDesc:
3218     Creates a new Perl statement.
3219     @@Param:
3220     @@@Name: codeArg
3221 wakaba 1.35 @@@Type: DOMString
3222 wakaba 1.11 @@@enDesc:
3223     A Perl statement without terminating <Perl::;>.
3224     @@@nullCase:
3225     @@@@enDesc:
3226     No initial content.
3227     @@Return:
3228 wakaba 1.25 @@@Type: PerlStatement
3229 wakaba 1.11 @@@enDesc:
3230     The newly created Perl code object.
3231     @@@PerlDef:
3232 wakaba 1.35 __DEEP{
3233     $r = $self-><M::DOMImpl.createDocument>
3234     -><M::Document.createElementNS> (<Q::pc:>, 'statement');
3235     if (defined $codeArg) {
3236     $r-><M::PerlCodeUnits.appendBare> ($codeArg);
3237     }
3238     }__;
3239 wakaba 1.12
3240     @Method:
3241     @@Name: createPerlIf
3242     @@enDesc:
3243 wakaba 1.35 Creates a <IF::PerlIf> object.
3244 wakaba 1.12 @@Param:
3245     @@@Name: conditionArg
3246 wakaba 1.35 @@@Type: PerlCodeInlines
3247 wakaba 1.12 @@@enDesc:
3248     Conditoon code fragment object.
3249     @@Param:
3250     @@@Name: trueArg
3251 wakaba 1.35 @@@Type: PerlCodeBlocks
3252 wakaba 1.12 @@@enDesc:
3253     A true code fragment object.
3254     @@@nullCase:
3255     @@@@enDesc: No true code.
3256     @@Param:
3257     @@@Name: falseArg
3258 wakaba 1.35 @@@Type: PerlCodeBlocks
3259 wakaba 1.12 @@@enDesc:
3260     A false code fragment object.
3261     @@@nullCase:
3262     @@@@enDesc: No false code.
3263     @@Return:
3264 wakaba 1.25 @@@Type: PerlIf
3265 wakaba 1.12 @@@RaiseException:
3266     @@@@@:BAD_CHILD_ERR
3267     @@@@enDesc:
3268     An attempt is made to append a child
3269     that is not valid type.
3270     @@@RaiseException:
3271     @@@@@:IN_USE_NODE_ERR
3272     @@@@enDesc:
3273     An attempt is made to append a node that is
3274     already used elsewhere.
3275     @@@PerlDef:
3276 wakaba 1.35 for my $arg ([conditionArg => $conditionArg]) {
3277     if ({
3278     atom => 1, tokens => 1, inlineContainer => 1, assignment => true,
3279     inlineUnparsed => 1, variable => 1, stringLiteral => true,
3280     }->{$arg->[1]-><AG::Node.localName>}) {
3281     if ($arg->[1]-><AG::Node.parentNode>) {
3282     __EXCEPTION{IN_USE_NODE_ERR::
3283     pc:childNode => {$arg->[1]},
3284     MDOMX:param-name => {$arg->[0]},
3285     }__;
3286     }
3287     } else {
3288     __EXCEPTION{BAD_CHILD_ERR::
3289     pc:parentNode => {$self},
3290     pc:childNode => {$arg->[1]},
3291     MDOMX:param-name => {$arg->[0]},
3292     }__;
3293     }
3294     } # c
3295    
3296     for my $arg ([trueArg => $trueArg],
3297     [falseArg => $falseArg]) {
3298     next unless $arg->[1];
3299     if ({
3300     blockContainer => true,
3301     }->{$arg->[1]-><AG::Node.localName>}) {
3302     if ($arg->[1]-><AG::Node.parentNode>) {
3303     __EXCEPTION{IN_USE_NODE_ERR::
3304     pc:childNode => {$arg->[1]},
3305     MDOMX:param-name => {$arg->[0]},
3306     }__;
3307     }
3308     } else {
3309     __EXCEPTION{BAD_CHILD_ERR::
3310     pc:parentNode => {$self},
3311     pc:childNode => {$arg->[1]},
3312     MDOMX:param-name => {$arg->[0]},
3313     }__;
3314     }
3315     } # t/f
3316    
3317     __DEEP{
3318     $r = $self-><M::DOMImpl.createDocument>
3319     -><M::Document.createElementNS>
3320     (<Q::pc:>, 'if');
3321     $r-><AS::PerlIf.condition> ($conditionArg) if $conditionArg;
3322     $r-><AS::PerlIf.trueCode> ($trueArg) if $trueArg;
3323     $r-><AS::PerlIf.falseCode> ($falseArg) if $falseArg;
3324     }__;
3325 wakaba 1.25 ##PCImplementation
3326 wakaba 1.1
3327 wakaba 1.5 ResourceDef:
3328 wakaba 1.35 @QName: DOMImpl
3329     @AliasFor: DOMCore|DOMImplementation
3330     @For: ManakaiDOM|DOM
3331    
3332     ResourceDef:
3333     @QName: Node
3334     @AliasFor: DOMCore|Node
3335     @For: ManakaiDOM|DOM
3336    
3337     ResourceDef:
3338     @QName: Element
3339     @AliasFor: DOMCore|Element
3340     @For: ManakaiDOM|DOM
3341    
3342     ResourceDef:
3343     @QName: Document
3344     @AliasFor: DOMCore|Document
3345     @For: ManakaiDOM|DOM
3346    
3347 wakaba 1.4 ## -- Exceptions
3348    
3349 wakaba 1.25 ResourceDef:
3350     @rdf:type:
3351     @@@: dis|MultipleResource
3352     @@ForCheck: !ManakaiDOM|ForIF !ManakaiDOM|ForClass
3353     @resourceFor: ManakaiDOM|ForIF
3354     @resourceFor: ManakaiDOM|ForClass
3355    
3356     @For: ManakaiDOM|Perl
3357    
3358     @rdf:type:
3359 wakaba 1.33 @@@: dx|Interface
3360 wakaba 1.25 @@ForCheck: ManakaiDOM|ForIF
3361    
3362     @rdf:type:
3363 wakaba 1.33 @@@: dx|Class
3364 wakaba 1.25 @@ForCheck: ManakaiDOM|ForClass
3365    
3366     @Implement:
3367 wakaba 1.35 @@@: ||ManakaiDOM|ManakaiDOM|ManakaiDOM||ManakaiDOM|ForIF
3368     @@ContentType: DISCore|TFPQNames
3369     @@ForCheck: ManakaiDOM|ForClass
3370     @Implement:
3371     @@@: ||ManakaiDOM|ManakaiDOM|ManakaiDOMLatest||ManakaiDOM|ForIF
3372 wakaba 1.25 @@ContentType: DISCore|TFPQNames
3373     @@ForCheck: ManakaiDOM|ForClass
3374 wakaba 1.35 @dx:implementedBy: ||ManakaiDOM|ManakaiDOMLatest||ManakaiDOM|ForClass
3375 wakaba 1.25
3376 wakaba 1.35 @f:implements: pc|CoreFeature10
3377 wakaba 1.25
3378     @ISA:
3379 wakaba 1.33 @@@: dx|Exception||ManakaiDOM|Perl
3380 wakaba 1.25 @@ForCheck: ManakaiDOM|ForClass
3381    
3382     @IFQName: PCException
3383 wakaba 1.35 @QName:
3384     @@@: ManakaiPCException
3385     @@ForCheck: ManakaiDOM|ForClass
3386 wakaba 1.25
3387 wakaba 1.4 @enDesc:
3388 wakaba 1.25 Exceptions for the <Module::Util:PerlCode> module.
3389    
3390     @ResourceDef:
3391 wakaba 1.33 @@ForCheck: ManakaiDOM|ForIF
3392     @@rdf:type: DISLang|ConstGroup
3393 wakaba 1.25
3394     @@IFQName: PCExceptionCode
3395    
3396 wakaba 1.4 @@enDesc:
3397 wakaba 1.25 Exception codes for <IF::PCException>.
3398    
3399 wakaba 1.33 @@Type: idl|unsignedShort||ManakaiDOM|all
3400     @@rdfs:subClassOf: idl|unsignedShort||ManakaiDOM|all
3401 wakaba 1.25
3402 wakaba 1.5 @@XConstDef:
3403     @@@Name: HIERARCHY_REQUEST_ERR
3404 wakaba 1.27 @@@Value:
3405     @@@@@:3
3406     @@@@ContentType: DISCore|Integer
3407 wakaba 1.5 @@@enDesc:
3408     An attempt is made to break the hierarchy.
3409     @@@XSubTypeDef:
3410     @@@@QName: BAD_CHILD_ERR
3411     @@@@enDesc:
3412     An attempt is made to append a node as a child whose type
3413     is not allowed.
3414     @@@@XParam:
3415     @@@@@QName: childNode
3416     @@@@@enDesc:
3417     The node attempted to append.
3418     @@@@XParam:
3419     @@@@@QName: parentNode
3420     @@@@@enDesc:
3421     The node to whose child list an attempt to append is made.
3422     @@@XSubTypeDef:
3423     @@@@QName: IN_USE_NODE_ERR
3424     @@@@enDesc:
3425     An attempt is made to append a node that has already been used
3426     elsewhere.
3427     @@@@XParam:
3428     @@@@@QName: childNode
3429     @@@@@enDesc:
3430     The node attempted to append.
3431     @@@@XParam:
3432     @@@@@QName: parentNode
3433     @@@@@enDesc:
3434     The parent node of the <XP::childNode>.
3435 wakaba 1.4 @@XConstDef:
3436     @@@Name: NOT_SUPPORTED_ERR
3437 wakaba 1.27 @@@Value:
3438     @@@@@:9
3439     @@@@ContentType: DISCore|Integer
3440 wakaba 1.4 @@@enDesc:
3441     An attempt is made to do something the implementation does not support.
3442     @@@XSubTypeDef:
3443     @@@@QName: UNSUPPORTED_OPERATOR_ERR
3444     @@@@enDesc:
3445     The implementation does not support the specified operator.
3446     @@@@XParam:
3447     @@@@@QName: operator
3448     @@@@@enDesc:
3449     The operator that is not supported.
3450     @@@@enMufDef:
3451     Operator "%p (name => {<Q::pc:operator>});" is not supported
3452 wakaba 1.25 ##PCException
3453 wakaba 1.4
3454     ElementTypeBinding:
3455     @Name: XConstDef
3456     @ElementType:
3457     dis:ResourceDef
3458     @ShadowContent:
3459 wakaba 1.33 @@rdf:type: dx|ErrorCode
3460 wakaba 1.4
3461     ElementTypeBinding:
3462     @Name: XSubTypeDef
3463     @ElementType:
3464     dis:ResourceDef
3465     @ShadowContent:
3466 wakaba 1.33 @@rdf:type: dx|ErrorSubCode
3467 wakaba 1.4
3468     ElementTypeBinding:
3469     @Name: XParam
3470     @ElementType:
3471 wakaba 1.33 ecore:hasParameter
3472 wakaba 1.4
3473     ElementTypeBinding:
3474     @Name: XParamDef
3475     @ElementType:
3476     dis:ResourceDef
3477     @ShadowContent:
3478 wakaba 1.33 @@rdf:type: ecore|Parameter
3479 wakaba 1.27 @@For: =ManakaiDOM|all
3480 wakaba 1.4
3481     ElementTypeBinding:
3482     @Name: enMufDef
3483     @ElementType:
3484     dis:Def
3485     @ShadowContent:
3486     @@ContentType:
3487     lang:muf
3488     @@lang:en
3489    
3490 wakaba 1.1 ElementTypeBinding:
3491     @Name: Method
3492     @ElementType:
3493     dis:ResourceDef
3494     @ShadowContent:
3495     @@rdf:type:
3496     DISLang:Method
3497    
3498     ElementTypeBinding:
3499     @Name: ToStringMethod
3500     @ElementType:
3501     dis:ResourceDef
3502     @ShadowContent:
3503     @@rdf:type:
3504     DISLang:Method
3505     @@Operator:
3506     @@@@:
3507     DISPerl:AsStringMethod
3508 wakaba 1.35 @@@ContentType: DISCore|QName
3509 wakaba 1.1 @@Description:
3510     @@@lang:en
3511     @@@@:
3512     Returns the textual Perl source code representation of this object.
3513 wakaba 1.9
3514 wakaba 1.14 ElementTypeBinding:
3515     @Name: NumValMethod
3516     @ElementType:
3517     dis:ResourceDef
3518     @ShadowContent:
3519     @@rdf:type:
3520     DISLang:Method
3521     @@Operator:
3522     @@@@: 0+
3523     @@@ContentType:
3524     lang:Perl
3525     @@Description:
3526     @@@lang:en
3527     @@@@:
3528     Returns the numeric value of this object.
3529 wakaba 1.9
3530     ElementTypeBinding:
3531 wakaba 1.1 @Name: IntMethod
3532     @ElementType:
3533     dis:ResourceDef
3534     @ShadowContent:
3535     @@rdf:type:
3536     DISLang:Method
3537     @@ManakaiDOM:isForInternal:1
3538    
3539     ElementTypeBinding:
3540     @Name: Attr
3541     @ElementType:
3542     dis:ResourceDef
3543     @ShadowContent:
3544     @@rdf:type:
3545     DISLang:Attribute
3546    
3547     ElementTypeBinding:
3548     @Name: Return
3549     @ElementType:
3550     dis:ResourceDef
3551     @ShadowContent:
3552     @@rdf:type:
3553     DISLang:MethodReturn
3554    
3555     ElementTypeBinding:
3556     @Name: Get
3557     @ElementType:
3558     dis:ResourceDef
3559     @ShadowContent:
3560     @@rdf:type:
3561     DISLang:AttributeGet
3562    
3563     ElementTypeBinding:
3564     @Name: Set
3565     @ElementType:
3566     dis:ResourceDef
3567     @ShadowContent:
3568     @@rdf:type:
3569     DISLang:AttributeSet
3570    
3571     ElementTypeBinding:
3572     @Name: Param
3573     @ElementType:
3574     dis:ResourceDef
3575     @ShadowContent:
3576     @@rdf:type:
3577     DISLang:MethodParameter
3578    
3579     ElementTypeBinding:
3580     @Name: PerlDef
3581     @ElementType:
3582     dis:Def
3583     @ShadowContent:
3584     @@ContentType:
3585     lang:Perl
3586 wakaba 1.27 @@ForCheck: ManakaiDOM|ForClass
3587 wakaba 1.28
3588     ElementTypeBinding:
3589     @Name: PerlCDef
3590     @ElementType:
3591     dis:Def
3592     @ShadowContent:
3593     @@ContentType:
3594     lang:Perl
3595 wakaba 1.1
3596     ElementTypeBinding:
3597     @Name: disDef
3598     @ElementType:
3599     dis:Def
3600     @ShadowContent:
3601     @@ContentType:
3602     lang:dis
3603 wakaba 1.27 @@ForCheck: ManakaiDOM|ForClass
3604 wakaba 1.1
3605     ElementTypeBinding:
3606     @Name: InCase
3607     @ElementType:
3608     dis:ResourceDef
3609     @ShadowContent:
3610     @@rdf:type:
3611     ManakaiDOM:InCase
3612    
3613     ElementTypeBinding:
3614     @Name: nullCase
3615     @ElementType:
3616     dis:ResourceDef
3617     @ShadowContent:
3618     @@rdf:type:
3619     ManakaiDOM:InCase
3620     @@Value:
3621     @@@is-null:1
3622    
3623     ElementTypeBinding:
3624     @Name: TrueCase
3625     @ElementType:
3626     dis:ResourceDef
3627     @ShadowContent:
3628     @@rdf:type:
3629     ManakaiDOM:InCase
3630 wakaba 1.27 @@Value:
3631     @@@@:1
3632     @@@ContentType: DISCore|Boolean
3633 wakaba 1.1 @@Type:
3634 wakaba 1.12 DOMMain:boolean::ManakaiDOM:all
3635 wakaba 1.1
3636    
3637     ElementTypeBinding:
3638     @Name: FalseCase
3639     @ElementType:
3640     dis:ResourceDef
3641     @ShadowContent:
3642     @@rdf:type:
3643     ManakaiDOM:InCase
3644 wakaba 1.27 @@Value:
3645     @@@@:0
3646     @@@ContentType: DISCore|Boolean
3647 wakaba 1.1 @@Type:
3648 wakaba 1.12 DOMMain:boolean::ManakaiDOM:all
3649 wakaba 1.1
3650     ElementTypeBinding:
3651     @Name: enDesc
3652     @ElementType:
3653     dis:Description
3654     @ShadowContent:
3655     @@lang:en
3656    
3657     ElementTypeBinding:
3658     @Name: PropDef
3659     @ElementType:
3660     dis:ResourceDef
3661     @ShadowContent:
3662     @@rdf:type:
3663     rdf:Property
3664 wakaba 1.27 @@For: =ManakaiDOM|all
3665 wakaba 1.1
3666     ElementTypeBinding:
3667     @Name: NamedParam
3668     @ElementType:
3669     dis:ResourceDef
3670     @ShadowContent:
3671     @@rdf:type:
3672     DISLang:MethodParameter
3673     @@DISPerl:isNamedParameter:1
3674    

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24