/
BuilderI.php
1101 lines (1008 loc) · 27.4 KB
/
BuilderI.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?php
/**
* This file is part of PHP_Depend.
*
* PHP Version 5
*
* Copyright (c) 2008-2011, Manuel Pichler <mapi@pdepend.org>.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* * Neither the name of Manuel Pichler nor the names of his
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* @category QualityAssurance
* @package PHP_Depend
* @author Manuel Pichler <mapi@pdepend.org>
* @copyright 2008-2011 Manuel Pichler. All rights reserved.
* @license http://www.opensource.org/licenses/bsd-license.php BSD License
* @version SVN: $Id$
* @link http://pdepend.org/
*/
/**
* Base interface for all code node builders.
*
* @category QualityAssurance
* @package PHP_Depend
* @author Manuel Pichler <mapi@pdepend.org>
* @copyright 2008-2011 Manuel Pichler. All rights reserved.
* @license http://www.opensource.org/licenses/bsd-license.php BSD License
* @version Release: @package_version@
* @link http://pdepend.org/
*/
interface PHP_Depend_BuilderI
extends PHP_Depend_ConstantsI, IteratorAggregate
{
/**
* Setter method for the currently used token cache.
*
* @param PHP_Depend_Util_Cache_Driver $cache Used token cache instance.
*
* @return PHP_Depend_Builder_Default
* @since 0.10.0
*/
function setCache(PHP_Depend_Util_Cache_Driver $cache);
/**
* Restores a function within the internal type scope.
*
* @param PHP_Depend_Code_Function $function A function instance.
*
* @return void
* @since 0.10.0
*/
function restoreFunction(PHP_Depend_Code_Function $function);
/**
* This method will try to find an already existing instance for the given
* qualified name. It will create a new {@link PHP_Depend_Code_Class}
* instance when no matching type exists.
*
* @param string $qualifiedName The full qualified type identifier.
*
* @return PHP_Depend_Code_AbstractClassOrInterface
* @since 0.9.5
*/
function getClassOrInterface($qualifiedName);
/**
* Builds a new code type reference instance.
*
* @param string $qualifiedName The qualified name of the referenced type.
*
* @return PHP_Depend_Code_ASTClassOrInterfaceReference
* @since 0.9.5
*/
function buildASTClassOrInterfaceReference($qualifiedName);
/**
* Builds a new code class instance.
*
* @param string $qualifiedName The class name.
*
* @return PHP_Depend_Code_Class The created class object.
*/
function buildClass($qualifiedName);
/**
* This method will try to find an already existing instance for the given
* qualified name. It will create a new {@link PHP_Depend_Code_Class}
* instance when no matching type exists.
*
* @param string $qualifiedName The full qualified type identifier.
*
* @return PHP_Depend_Code_Class
* @since 0.9.5
*/
function getClass($qualifiedName);
/**
* Restores an existing class instance within the context of this builder.
*
* @param PHP_Depend_Code_Class $class An existing class instance.
*
* @return void
* @since 0.10.0
*/
function restoreClass(PHP_Depend_Code_Class $class);
/**
* Builds a new code type reference instance.
*
* @param string $qualifiedName The qualified name of the referenced type.
*
* @return PHP_Depend_Code_ASTClassReference
* @since 0.9.5
*/
function buildASTClassReference($qualifiedName);
/**
* Builds a new new interface instance.
*
* @param string $qualifiedName The interface name.
*
* @return PHP_Depend_Code_Interface The created interface object.
*/
function buildInterface($qualifiedName);
/**
* Restores an existing interface instance within the context of this builder.
*
* @param PHP_Depend_Code_Interface $interface An existing interface instance.
*
* @return void
* @since 0.10.0
*/
function restoreInterface(PHP_Depend_Code_Interface $interface);
/**
* This method will try to find an already existing instance for the given
* qualified name. It will create a new {@link PHP_Depend_Code_Interface}
* instance when no matching type exists.
*
* @param string $qualifiedName The full qualified type identifier.
*
* @return PHP_Depend_Code_Interface
* @since 0.9.5
*/
function getInterface($qualifiedName);
/**
* Builds a new package instance.
*
* @param string $name The package name.
*
* @return PHP_Depend_Code_Package The created package object.
*/
function buildPackage($name);
/**
* Builds a new method instance.
*
* @param string $name The method name.
*
* @return PHP_Depend_Code_Method The created class method object.
*/
function buildMethod($name);
/**
* Builds a new function instance.
*
* @param string $name The function name.
*
* @return PHP_Depend_Code_Function The function instance
*/
function buildFunction($name);
/**
* Builds a new self reference instance.
*
* @param PHP_Depend_Code_AbstractClassOrInterface $type The type instance
* that reference the concrete target of self.
*
* @return PHP_Depend_Code_ASTSelfReference
* @since 0.9.6
*/
function buildASTSelfReference(PHP_Depend_Code_AbstractClassOrInterface $type);
/**
* Builds a new parent reference instance.
*
* @param PHP_Depend_Code_ASTClassOrInterfaceReference $reference The type
* instance that reference the concrete target of parent.
*
* @return PHP_Depend_Code_ASTParentReference
* @since 0.9.6
*/
function buildASTParentReference(
PHP_Depend_Code_ASTClassOrInterfaceReference $reference
);
/**
* Builds a new static reference instance.
*
* @param PHP_Depend_Code_AbstractClassOrInterface $owner The owning instance
* that reference the concrete target of static.
*
* @return PHP_Depend_Code_ASTStaticReference
* @since 0.9.6
*/
function buildASTStaticReference(
PHP_Depend_Code_AbstractClassOrInterface $owner
);
/**
* Builds a new field declaration node.
*
* @return PHP_Depend_Code_ASTFieldDeclaration
* @since 0.9.6
*/
function buildASTFieldDeclaration();
/**
* Builds a new variable declarator node.
*
* @param string $image The source image for the variable declarator.
*
* @return PHP_Depend_Code_ASTVariableDeclarator
* @since 0.9.6
*/
function buildASTVariableDeclarator($image);
/**
* Builds a new constant node.
*
* @param string $image The source image for the constant.
*
* @return PHP_Depend_Code_ASTConstant
* @since 0.9.6
*/
function buildASTConstant($image);
/**
* Builds a new variable node.
*
* @param string $image The source image for the variable.
*
* @return PHP_Depend_Code_ASTVariable
* @since 0.9.6
*/
function buildASTVariable($image);
/**
* Builds a new variable variable node.
*
* @param string $image The source image for the variable variable.
*
* @return PHP_Depend_Code_ASTVariableVariable
* @since 0.9.6
*/
function buildASTVariableVariable($image);
/**
* Builds a new compound variable node.
*
* @param string $image The source image for the compound variable.
*
* @return PHP_Depend_Code_ASTCompoundVariable
* @since 0.9.6
*/
function buildASTCompoundVariable($image);
/**
* Builds a new compound expression node.
*
* @return PHP_Depend_Code_ASTCompoundExpression
* @since 0.9.6
*/
function buildASTCompoundExpression();
/**
* Builds a new static variable declaration node.
*
* @param string $image The source image for the static declaration.
*
* @return PHP_Depend_Code_ASTStaticVariableDeclaration
* @since 0.9.6
*/
function buildASTStaticVariableDeclaration($image);
/**
* Builds a new closure node.
*
* @return PHP_Depend_Code_ASTClosure
* @since 0.9.12
*/
function buildASTClosure();
/**
* Builds a new formal parameters node.
*
* @return PHP_Depend_Code_ASTFormalParameters
* @since 0.9.6
*/
function buildASTFormalParameters();
/**
* Builds a new formal parameter node.
*
* @return PHP_Depend_Code_ASTFormalParameter
* @since 0.9.6
*/
function buildASTFormalParameter();
/**
* Builds a new expression node.
*
* @return PHP_Depend_Code_ASTExpression
* @since 0.9.8
*/
function buildASTExpression();
/**
* Builds a new assignment expression node.
*
* @param string $image The assignment operator.
*
* @return PHP_Depend_Code_ASTAssignmentExpression
* @since 0.9.8
*/
function buildASTAssignmentExpression($image);
/**
* Builds a new allocation expression node.
*
* @param string $image The source image of this expression.
*
* @return PHP_Depend_Code_ASTAllocationExpression
* @since 0.9.6
*/
function buildASTAllocationExpression($image);
/**
* Builds a new eval-expression node.
*
* @param string $image The source image of this expression.
*
* @return PHP_Depend_Code_ASTEvalExpression
* @since 0.9.12
*/
function buildASTEvalExpression($image);
/**
* Builds a new exit-expression instance.
*
* @param string $image The source code image for this node.
*
* @return PHP_Depend_Code_ASTExitExpression
* @since 0.9.12
*/
function buildASTExitExpression($image);
/**
* Builds a new clone-expression node.
*
* @param string $image The source image of this expression.
*
* @return PHP_Depend_Code_ASTCloneExpression
* @since 0.9.12
*/
function buildASTCloneExpression($image);
/**
* Builds a new list-expression node.
*
* @param string $image The source image of this expression.
*
* @return PHP_Depend_Code_ASTListExpression
* @author Joey Mazzarelli
* @since 0.9.12
*/
function buildASTListExpression($image);
/**
* Builds a new include- or include_once-expression.
*
* @return PHP_Depend_Code_ASTIncludeExpression
* @since 0.9.12
*/
function buildASTIncludeExpression();
/**
* Builds a new require- or require_once-expression.
*
* @return PHP_Depend_Code_ASTRequireExpression
* @since 0.9.12
*/
function buildASTRequireExpression();
/**
* Builds a new array-expression node.
*
* @return PHP_Depend_Code_ASTArrayIndexExpression
* @since 0.9.12
*/
function buildASTArrayIndexExpression();
/**
* Builds a new string-expression node.
*
* <code>
* // --------
* $string{$index}
* // --------
* </code>
*
* @return PHP_Depend_Code_ASTStringIndexExpression
* @since 0.9.12
*/
function buildASTStringIndexExpression();
/**
* Builds a new instanceof-expression node.
*
* @param string $image The source image of this expression.
*
* @return PHP_Depend_Code_ASTInstanceOfExpression
* @since 0.9.6
*/
function buildASTInstanceOfExpression($image);
/**
* Builds a new isset-expression node.
*
* <code>
* // -----------
* if (isset($foo)) {
* // -----------
* }
*
* // -----------------------
* if (isset($foo, $bar, $baz)) {
* // -----------------------
* }
* </code>
*
* @return PHP_Depend_Code_ASTIssetExpression
* @since 0.9.12
*/
function buildASTIssetExpression();
/**
* Builds a new boolean conditional-expression.
*
* <code>
* --------------
* $bar = ($foo ? 42 : 23);
* --------------
* </code>
*
* @return PHP_Depend_Code_ASTConditionalExpression
* @since 0.9.8
*/
function buildASTConditionalExpression();
/**
* Builds a new boolean and-expression.
*
* @return PHP_Depend_Code_ASTBooleanAndExpression
* @since 0.9.8
*/
function buildASTBooleanAndExpression();
/**
* Builds a new boolean or-expression.
*
* @return PHP_Depend_Code_ASTBooleanOrExpression
* @since 0.9.8
*/
function buildASTBooleanOrExpression();
/**
* Builds a new logical <b>and</b>-expression.
*
* @return PHP_Depend_Code_ASTLogicalAndExpression
* @since 0.9.8
*/
function buildASTLogicalAndExpression();
/**
* Builds a new logical <b>or</b>-expression.
*
* @return PHP_Depend_Code_ASTLogicalOrExpression
* @since 0.9.8
*/
function buildASTLogicalOrExpression();
/**
* Builds a new logical <b>xor</b>-expression.
*
* @return PHP_Depend_Code_ASTLogicalXorExpression
* @since 0.9.8
*/
function buildASTLogicalXorExpression();
/**
* Builds a new switch-statement-node.
*
* @return PHP_Depend_Code_ASTSwitchStatement
* @since 0.9.8
*/
function buildASTSwitchStatement();
/**
* Builds a new switch-label node.
*
* @param string $image The source image of this label.
*
* @return PHP_Depend_Code_ASTSwitchLabel
* @since 0.9.8
*/
function buildASTSwitchLabel($image);
/**
* Builds a new catch-statement node.
*
* @param string $image The source image of this statement.
*
* @return PHP_Depend_Code_ASTCatchStatement
* @since 0.9.8
*/
function buildASTCatchStatement($image);
/**
* Builds a new if statement node.
*
* @param string $image The source image of this statement.
*
* @return PHP_Depend_Code_ASTIfStatement
* @since 0.9.8
*/
function buildASTIfStatement($image);
/**
* Builds a new elseif-statement node.
*
* @param string $image The source image of this statement.
*
* @return PHP_Depend_Code_ASTElseIfStatement
* @since 0.9.8
*/
function buildASTElseIfStatement($image);
/**
* Builds a new for-statement node.
*
* @param string $image The source image of this statement.
*
* @return PHP_Depend_Code_ASTForStatement
* @since 0.9.8
*/
function buildASTForStatement($image);
/**
* Builds a new for-init node.
*
* <code>
* ------------------------
* for ($x = 0, $y = 23, $z = 42; $x < $y; ++$x) {}
* ------------------------
* </code>
*
* @return PHP_Depend_Code_ASTForInit
* @since 0.9.8
*/
function buildASTForInit();
/**
* Builds a new for-update node.
*
* <code>
* -------------------------------
* for ($x = 0, $y = 23, $z = 42; $x < $y; ++$x, $y = $x + 1, $z = $x + 2) {}
* -------------------------------
* </code>
*
* @return PHP_Depend_Code_ASTForUpdate
* @since 0.9.12
*/
function buildASTForUpdate();
/**
* Builds a new foreach-statement node.
*
* @param string $image The source image of this statement.
*
* @return PHP_Depend_Code_ASTForeachStatement
* @since 0.9.8
*/
function buildASTForeachStatement($image);
/**
* Builds a new while-statement node.
*
* @param string $image The source image of this statement.
*
* @return PHP_Depend_Code_ASTWhileStatement
* @since 0.9.8
*/
function buildASTWhileStatement($image);
/**
* Builds a new do/while-statement node.
*
* @param string $image The source image of this statement.
*
* @return PHP_Depend_Code_ASTDoWhileStatement
* @since 0.9.12
*/
function buildASTDoWhileStatement($image);
/**
* Builds a new declare-statement node.
*
* <code>
* -------------------------------
* declare(encoding='ISO-8859-1');
* -------------------------------
*
* -------------------
* declare(ticks=42) {
* // ...
* }
* -
*
* ------------------
* declare(ticks=42):
* // ...
* enddeclare;
* -----------
* </code>
*
* @return PHP_Depend_Code_ASTDeclareStatement
* @since 0.10.0
*/
function buildASTDeclareStatement();
/**
* Builds a new member primary expression node.
*
* <code>
* //--------
* Foo::bar();
* //--------
*
* //---------
* Foo::$bar();
* //---------
*
* //---------
* $obj->bar();
* //---------
*
* //----------
* $obj->$bar();
* //----------
* </code>
*
* @param string $image The source image of this expression.
*
* @return PHP_Depend_Code_ASTMemberPrimaryPrefix
* @since 0.9.6
*/
function buildASTMemberPrimaryPrefix($image);
/**
* Builds a new identifier node.
*
* @param string $image The image of this identifier.
*
* @return PHP_Depend_Code_ASTIdentifier
* @since 0.9.6
*/
function buildASTIdentifier($image);
/**
* Builds a new function postfix expression.
*
* <code>
* //-------
* foo($bar);
* //-------
*
* //--------
* $foo($bar);
* //--------
* </code>
*
* @param string $image The image of this node.
*
* @return PHP_Depend_Code_ASTFunctionPostfix
* @since 0.9.6
*/
function buildASTFunctionPostfix($image);
/**
* Builds a new method postfix expression.
*
* <code>
* // ---------
* Foo::bar($baz);
* // ---------
*
* // ----------
* Foo::$bar($baz);
* // ----------
* </code>
*
* @param string $image The image of this node.
*
* @return PHP_Depend_Code_ASTMethodPostfix
* @since 0.9.6
*/
function buildASTMethodPostfix($image);
/**
* Builds a new constant postfix expression.
*
* <code>
* // ---
* Foo::BAR;
* // ---
* </code>
*
* @param string $image The image of this node.
*
* @return PHP_Depend_Code_ASTConstantPostfix
* @since 0.9.6
*/
function buildASTConstantPostfix($image);
/**
* Builds a new property postfix expression.
*
* <code>
* // ----
* Foo::$bar;
* // ----
*
* // ---
* $object->bar;
* // ---
* </code>
*
* @param string $image The image of this node.
*
* @return PHP_Depend_Code_ASTPropertyPostfix
* @since 0.9.6
*/
function buildASTPropertyPostfix($image);
/**
* Builds a new arguments list.
*
* <code>
* // ------------
* Foo::bar($x, $y, $z);
* // ------------
*
* // ------------
* $foo->bar($x, $y, $z);
* // ------------
* </code>
*
* @return PHP_Depend_Code_ASTArguments();
* @since 0.9.6
*/
function buildASTArguments();
/**
* Builds a new array type node.
*
* @return PHP_Depend_Code_ASTTypeArray
* @since 0.9.6
*/
function buildASTTypeArray();
/**
* Builds a new node for the callable type.
*
* @return PHP_Depend_Code_ASTTypeCallable
* @since 0.11.0
*/
function buildASTTypeCallable();
/**
* Builds a new primitive type node.
*
* @param string $image The source image for the primitive type.
*
* @return PHP_Depend_Code_ASTPrimitiveType
* @since 0.9.6
*/
function buildASTPrimitiveType($image);
/**
* Builds a new literal node.
*
* @param string $image The source image for the literal node.
*
* @return PHP_Depend_Code_ASTLiteral
* @since 0.9.6
*/
function buildASTLiteral($image);
/**
* Builds a new php string node.
*
* <code>
* $string = "Manuel $Pichler <{$email}>";
*
* // PHP_Depend_Code_ASTString
* // |-- ASTLiteral - "Manuel ")
* // |-- ASTVariable - $Pichler
* // |-- ASTLiteral - " <"
* // |-- ASTCompoundExpression - {...}
* // | |-- ASTVariable - $email
* // |-- ASTLiteral - ">"
* </code>
*
* @return PHP_Depend_Code_ASTString
* @since 0.9.10
*/
function buildASTString();
/**
* Builds a new heredoc node.
*
* @return PHP_Depend_Code_ASTHeredoc
* @since 0.9.12
*/
function buildASTHeredoc();
/**
* Builds a new constant definition node.
*
* <code>
* class Foo
* {
* // ------------------------
* const FOO = 42, BAR = 23;
* // ------------------------
* }
* </code>
*
* @param string $image The source code image for this node.
*
* @return PHP_Depend_Code_ASTConstantDefinition
* @since 0.9.6
*/
function buildASTConstantDefinition($image);
/**
* Builds a new constant declarator node.
*
* <code>
* class Foo
* {
* // --------
* const BAR = 42;
* // --------
* }
* </code>
*
* Or in a comma separated constant defintion:
*
* <code>
* class Foo
* {
* // --------
* const BAR = 42,
* // --------
*
* // --------------
* const BAZ = 'Foobar',
* // --------------
*
* // ----------
* const FOO = 3.14;
* // ----------
* }
* </code>
*
* @param string $image The source code image for this node.
*
* @return PHP_Depend_Code_ASTConstantDeclarator
* @since 0.9.6
*/
function buildASTConstantDeclarator($image);
/**
* Builds a new comment node instance.
*
* @param string $cdata The comment text.
*
* @return PHP_Depend_Code_ASTComment
* @since 0.9.8
*/
function buildASTComment($cdata);
/**
* Builds a new unary expression node instance.
*
* @param string $image The unary expression image/character.
*
* @return PHP_Depend_Code_ASTUnaryExpression
* @since 0.9.11
*/
function buildASTUnaryExpression($image);
/**
* Builds a new cast-expression node instance.
*
* @param string $image The cast-expression image/character.
*
* @return PHP_Depend_Code_ASTCastExpression
* @since 0.10.0
*/
function buildASTCastExpression($image);
/**
* Builds a new postfix-expression node instance.
*
* @param string $image The postfix-expression image/character.
*
* @return PHP_Depend_Code_ASTPostfixExpression
* @since 0.10.0
*/
function buildASTPostfixExpression($image);
/**
* Builds a new pre-increment-expression node instance.
*
* @return PHP_Depend_Code_ASTPreIncrementExpression
* @since 0.10.0
*/
function buildASTPreIncrementExpression();
/**
* Builds a new pre-decrement-expression node instance.
*
* @return PHP_Depend_Code_ASTPreDecrementExpression
* @since 0.10.0
*/
function buildASTPreDecrementExpression();
/**
* Builds a new function/method scope instance.
*
* @return PHP_Depend_Code_ASTScope
* @since 0.9.12
*/
function buildASTScope();
/**
* Builds a new statement instance.
*
* @return PHP_Depend_Code_ASTStatement
* @since 0.9.12
*/
function buildASTStatement();
/**
* Builds a new return-statement node instance.
*