summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharlie Brej <cbrej@cs.man.ac.uk>2009-07-12 15:11:43 +0100
committerCharlie Brej <cbrej@cs.man.ac.uk>2009-07-12 15:11:43 +0100
commit19d68ed408f1f85fb387b0841d5bfe0b089e6b6c (patch)
tree7443b4d946c63813fb46ebd821e9a55d645c32be
parentf88d7603c6c275f2343d6bc5a1cce1b152064b8b (diff)
[script] Remove a no longer necessary parse error test and message
Also a couple minor indentations
-rw-r--r--src/plugins/splash/script/script-parse.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/src/plugins/splash/script/script-parse.c b/src/plugins/splash/script/script-parse.c
index 518ce88e..d3bfbcaf 100644
--- a/src/plugins/splash/script/script-parse.c
+++ b/src/plugins/splash/script/script-parse.c
@@ -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, ','))
{