File tree Expand file tree Collapse file tree 3 files changed +2
-16
lines changed Expand file tree Collapse file tree 3 files changed +2
-16
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ XP Compiler ChangeLog
3
3
4
4
## ?.?.? / ????-??-??
5
5
6
+ * Removed unused scope defines - @thekid
6
7
* Fixed endless loop for unclosed argument lists - @thekid
7
8
* Fixed type annotations not being parsed - @thekid
8
9
Original file line number Diff line number Diff line change @@ -519,8 +519,6 @@ private function setup() {
519
519
}
520
520
521
521
$ variable = $ this ->token ;
522
- $ this ->scope ->define ($ variable ->value , $ variable );
523
-
524
522
$ this ->token = $ this ->advance ();
525
523
$ this ->token = $ this ->expect (') ' );
526
524
@@ -1072,7 +1070,7 @@ private function advance() {
1072
1070
list ($ value , $ line )= $ this ->tokens ->current ();
1073
1071
$ this ->tokens ->next ();
1074
1072
if ('name ' === $ type ) {
1075
- $ node = $ this -> scope -> find ( $ value ) ?: new Node ($ this ->symbol ($ value ) ?: clone $ this ->symbol ('(name) ' ));
1073
+ $ node = new Node ($ this ->symbol ($ value ) ?: clone $ this ->symbol ('(name) ' ));
1076
1074
} else if ('operator ' === $ type ) {
1077
1075
$ node = new Node ($ this ->symbol ($ value ));
1078
1076
} else if ('string ' === $ type || 'integer ' === $ type || 'decimal ' === $ type ) {
Original file line number Diff line number Diff line change @@ -29,15 +29,6 @@ public function __construct(self $parent= null) {
29
29
$ this ->parent = $ parent ;
30
30
}
31
31
32
- public function define ($ name , $ node ) {
33
- $ definition = clone $ node ;
34
- $ definition ->symbol ->nud = function ($ self ) { return $ self ; };
35
- $ definition ->symbol ->led = null ;
36
- $ definition ->symbol ->std = null ;
37
- $ definition ->symbol ->lbp = 0 ;
38
- $ this ->defines [$ name ]= $ definition ;
39
- }
40
-
41
32
/**
42
33
* Sets package
43
34
*
@@ -79,8 +70,4 @@ public function resolve($name) {
79
70
return $ name ;
80
71
}
81
72
}
82
-
83
- public function find ($ name ) {
84
- return isset ($ this ->defines [$ name ]) ? $ this ->defines [$ name ] : null ;
85
- }
86
73
}
You can’t perform that action at this time.
0 commit comments