@@ -122,7 +122,6 @@ Lexer.prototype = {
122
122
this . text = text ;
123
123
this . index = 0 ;
124
124
this . ch = undefined ;
125
- this . lastCh = ':' ; // can start regexp
126
125
this . tokens = [ ] ;
127
126
128
127
while ( this . index < this . text . length ) {
@@ -141,7 +140,6 @@ Lexer.prototype = {
141
140
this . index ++ ;
142
141
} else if ( this . isWhitespace ( this . ch ) ) {
143
142
this . index ++ ;
144
- continue ;
145
143
} else {
146
144
var ch2 = this . ch + this . peek ( ) ;
147
145
var ch3 = ch2 + this . peek ( 2 ) ;
@@ -165,7 +163,6 @@ Lexer.prototype = {
165
163
this . throwError ( 'Unexpected next character ' , this . index , this . index + 1 ) ;
166
164
}
167
165
}
168
- this . lastCh = this . ch ;
169
166
}
170
167
return this . tokens ;
171
168
} ,
@@ -174,10 +171,6 @@ Lexer.prototype = {
174
171
return chars . indexOf ( this . ch ) !== - 1 ;
175
172
} ,
176
173
177
- was : function ( chars ) {
178
- return chars . indexOf ( this . lastCh ) !== - 1 ;
179
- } ,
180
-
181
174
peek : function ( i ) {
182
175
var num = i || 1 ;
183
176
return ( this . index + num < this . text . length ) ? this . text . charAt ( this . index + num ) : false ;
@@ -300,7 +293,7 @@ Lexer.prototype = {
300
293
return ( getter ( self , locals ) ) ;
301
294
} , {
302
295
assign : function ( self , value ) {
303
- return setter ( self , ident , value , parser . text , parser . options ) ;
296
+ return setter ( self , ident , value , parser . text ) ;
304
297
}
305
298
} ) ;
306
299
}
@@ -672,7 +665,7 @@ Parser.prototype = {
672
665
return getter ( self || object ( scope , locals ) ) ;
673
666
} , {
674
667
assign : function ( scope , value , locals ) {
675
- return setter ( object ( scope , locals ) , field , value , parser . text , parser . options ) ;
668
+ return setter ( object ( scope , locals ) , field , value , parser . text ) ;
676
669
}
677
670
} ) ;
678
671
} ,
@@ -686,7 +679,7 @@ Parser.prototype = {
686
679
return extend ( function ( self , locals ) {
687
680
var o = obj ( self , locals ) ,
688
681
i = indexFn ( self , locals ) ,
689
- v , p ;
682
+ v ;
690
683
691
684
if ( ! o ) return undefined ;
692
685
v = ensureSafeObject ( o [ i ] , parser . text ) ;
@@ -804,9 +797,7 @@ Parser.prototype = {
804
797
// Parser helper functions
805
798
//////////////////////////////////////////////////
806
799
807
- function setter ( obj , path , setValue , fullExp , options ) {
808
- //needed?
809
- options = options || { } ;
800
+ function setter ( obj , path , setValue , fullExp ) {
810
801
811
802
var element = path . split ( '.' ) , key ;
812
803
for ( var i = 0 ; element . length > 1 ; i ++ ) {
@@ -830,7 +821,7 @@ var getterFnCache = {};
830
821
* - http://jsperf.com/angularjs-parse-getter/4
831
822
* - http://jsperf.com/path-evaluation-simplified/7
832
823
*/
833
- function cspSafeGetterFn ( key0 , key1 , key2 , key3 , key4 , fullExp , options ) {
824
+ function cspSafeGetterFn ( key0 , key1 , key2 , key3 , key4 , fullExp ) {
834
825
ensureSafeMemberName ( key0 , fullExp ) ;
835
826
ensureSafeMemberName ( key1 , fullExp ) ;
836
827
ensureSafeMemberName ( key2 , fullExp ) ;
@@ -903,14 +894,13 @@ function getterFn(path, options, fullExp) {
903
894
fn = simpleGetterFn2 ( pathKeys [ 0 ] , pathKeys [ 1 ] , fullExp ) ;
904
895
} else if ( options . csp ) {
905
896
if ( pathKeysLength < 6 ) {
906
- fn = cspSafeGetterFn ( pathKeys [ 0 ] , pathKeys [ 1 ] , pathKeys [ 2 ] , pathKeys [ 3 ] , pathKeys [ 4 ] , fullExp ,
907
- options ) ;
897
+ fn = cspSafeGetterFn ( pathKeys [ 0 ] , pathKeys [ 1 ] , pathKeys [ 2 ] , pathKeys [ 3 ] , pathKeys [ 4 ] , fullExp ) ;
908
898
} else {
909
899
fn = function ( scope , locals ) {
910
900
var i = 0 , val ;
911
901
do {
912
902
val = cspSafeGetterFn ( pathKeys [ i ++ ] , pathKeys [ i ++ ] , pathKeys [ i ++ ] , pathKeys [ i ++ ] ,
913
- pathKeys [ i ++ ] , fullExp , options ) ( scope , locals ) ;
903
+ pathKeys [ i ++ ] , fullExp ) ( scope , locals ) ;
914
904
915
905
locals = undefined ; // clear after first iteration
916
906
scope = val ;
@@ -1006,7 +996,7 @@ function $ParseProvider() {
1006
996
} ;
1007
997
1008
998
1009
- this . $get = [ '$filter' , '$sniffer' , '$log' , function ( $filter , $sniffer , $log ) {
999
+ this . $get = [ '$filter' , '$sniffer' , function ( $filter , $sniffer ) {
1010
1000
$parseOptions . csp = $sniffer . csp ;
1011
1001
1012
1002
return function ( exp ) {
0 commit comments