]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
[script] Remove a no longer necessary parse error test and message
authorCharlie Brej <cbrej@cs.man.ac.uk>
Sun, 12 Jul 2009 14:11:43 +0000 (15:11 +0100)
committerCharlie Brej <cbrej@cs.man.ac.uk>
Sun, 12 Jul 2009 14:11:43 +0000 (15:11 +0100)
Also a couple minor indentations

src/plugins/splash/script/script-parse.c

index 518ce88e60fc25327e34937c1908de9569865c2a..d3bfbcaf83c2281f8d291523f7238191c187d142 100644 (file)
@@ -40,9 +40,9 @@
 
 typedef struct
 {
- const char*                            symbol;
- script_exp_type_t                      exp_type; 
- int                                    presedence;
+ const char        *symbol;
+ script_exp_type_t  exp_type; 
+ int                presedence;
 }script_parse_operator_table_entry_t;
 
 static script_op_t *script_parse_op (ply_scan_t *scan);
@@ -220,7 +220,7 @@ static script_exp_t *script_parse_exp_tm (ply_scan_t *scan)
       if (!exp)
         {
           script_parse_error (curtoken,
-                              "Expected valid contents of bracketed expression");
+            "Expected valid contents of bracketed expression");
           return NULL;
         }
       if (!ply_scan_token_is_symbol_of_value (curtoken, ')'))
@@ -232,7 +232,7 @@ static script_exp_t *script_parse_exp_tm (ply_scan_t *scan)
       ply_scan_get_next_token (scan);
       return exp;
     }
-  return exp;
+  return NULL;
 }
 
 static script_exp_t *script_parse_exp_pi (ply_scan_t *scan)
@@ -256,12 +256,6 @@ static script_exp_t *script_parse_exp_pi (ply_scan_t *scan)
               ply_list_append_data (parameters, parameter);
 
               curtoken = ply_scan_get_current_token (scan);
-              if (!ply_scan_token_is_symbol (curtoken))
-                {
-                  script_parse_error (curtoken,
-                    "Function parameters should be separated with a ',' and terminated with a ')'");
-                  return NULL;
-                }
               if (ply_scan_token_is_symbol_of_value (curtoken, ')')) break;
               if (!ply_scan_token_is_symbol_of_value (curtoken, ','))
                 {