✨ make sure parameter names are unique in list
This commit is contained in:
parent
a01f59a545
commit
0b32991018
@ -379,8 +379,17 @@ class Juicescript_parser {
|
|||||||
|
|
||||||
|
|
||||||
// GET PARAMETER NAME //
|
// GET PARAMETER NAME //
|
||||||
|
// parse
|
||||||
let parameter_name = this.parse_parameter();
|
let parameter_name = this.parse_parameter();
|
||||||
|
|
||||||
|
// make sure it's unique
|
||||||
|
for(var one_parameter of parameter_list){
|
||||||
|
if(one_parameter.name === parameter_name){
|
||||||
|
// ignore with error
|
||||||
|
this.error_token("same parameter name used twice:");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// CHECK FOR QUESTION MARK SUFFIX //
|
// CHECK FOR QUESTION MARK SUFFIX //
|
||||||
if(this.match_type(Juicescript.token_type.QUESTION_MARK)){
|
if(this.match_type(Juicescript.token_type.QUESTION_MARK)){
|
||||||
|
Reference in New Issue
Block a user