Menu

[r251]: / trunk / src / StatementItem.php  Maximize  Restore  History

Download this file

53 lines (43 with data), 1.4 kB

 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
<?php
/**
* Statement Item class.
*
* This object is stored in the "_branchingStack" array to keep track of nested statements.
*
* Inspired by http://www.phpcompiler.org/doc/latest/grammar.html
*
* @package classes
* @SuppressWarnings checkUnusedVariables
*/
class StatementItem {
// The statement type.
// CLASS
// FUNCTION
// INTERFACE
// IF
// ELSE
// ELSEIF
// FOR
// FOREACH
// TRY
// CATCH
// DO
// WHILE
var $type = null;
// The statement name
var $name = null;
// The begin line of the statement in the file
var $line;
// For FUNCTION statements
var $visibility;
// For SWITCH / CASE statements
var $switchHasDefault = false; // indicate that the switch instruction has a case "default" set.
var $caseHasBreak = false; // indicate that the current case has a break instruction
var $caseStartLine = 0; // start line of the currently processed case
// For DO / WHILE statements
var $afterDoStatement = false; // indicate that we have met a DO statement (which will be described in another StatementItem, but it will be closed when we meet the WHILE).
// For heredoc blocks
var $inHeredoc = false; // used to desactivate the encapsedVariable rule inside a heredoc block
// Flag indicating the the statement block is not sourrounded by {}
var $noCurly = false;
}
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.