summaryrefslogtreecommitdiffstatshomepage
path: root/py
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2015-03-03 17:11:18 +0000
committerDamien George <damien.p.george@gmail.com>2015-03-03 17:11:18 +0000
commit3665d0b2ffd41dac6be01016ac15afc0157ac393 (patch)
tree1718dc343a65ca87b272c00b4cbafd10183683ac /py
parent9c5cabb502b59e5cc4354c8ca66be3d4a3e03bf9 (diff)
downloadmicropython-3665d0b2ffd41dac6be01016ac15afc0157ac393.tar.gz
micropython-3665d0b2ffd41dac6be01016ac15afc0157ac393.zip
py: Simplify some inline-assembler error messages, but retain meaning.
Just to reduce code size. Messages are still to the point and unambiguous.
Diffstat (limited to 'py')
-rw-r--r--py/compile.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/py/compile.c b/py/compile.c
index 34e4f41ce1..d688bf4022 100644
--- a/py/compile.c
+++ b/py/compile.c
@@ -3389,7 +3389,7 @@ STATIC void compile_scope_inline_asm(compiler_t *comp, scope_t *scope, pass_kind
} else if (MP_PARSE_NODE_STRUCT_KIND(pns2) != PN_expr_stmt) {
// not an instruction; error
not_an_instruction:
- compile_syntax_error(comp, nodes[i], "inline assembler expecting an instruction");
+ compile_syntax_error(comp, nodes[i], "expecting an assembler instruction");
return;
}
@@ -3420,7 +3420,7 @@ STATIC void compile_scope_inline_asm(compiler_t *comp, scope_t *scope, pass_kind
// emit instructions
if (op == MP_QSTR_label) {
if (!(n_args == 1 && MP_PARSE_NODE_IS_ID(pn_arg[0]))) {
- compile_syntax_error(comp, nodes[i], "inline assembler 'label' requires 1 argument");
+ compile_syntax_error(comp, nodes[i], "'label' requires 1 argument");
return;
}
uint lab = comp_next_label(comp);
@@ -3432,7 +3432,7 @@ STATIC void compile_scope_inline_asm(compiler_t *comp, scope_t *scope, pass_kind
}
} else if (op == MP_QSTR_align) {
if (!(n_args == 1 && MP_PARSE_NODE_IS_SMALL_INT(pn_arg[0]))) {
- compile_syntax_error(comp, nodes[i], "inline assembler 'align' requires 1 argument");
+ compile_syntax_error(comp, nodes[i], "'align' requires 1 argument");
return;
}
if (pass > MP_PASS_SCOPE) {
@@ -3440,14 +3440,14 @@ STATIC void compile_scope_inline_asm(compiler_t *comp, scope_t *scope, pass_kind
}
} else if (op == MP_QSTR_data) {
if (!(n_args >= 2 && MP_PARSE_NODE_IS_SMALL_INT(pn_arg[0]))) {
- compile_syntax_error(comp, nodes[i], "inline assembler 'data' requires at least 2 arguments");
+ compile_syntax_error(comp, nodes[i], "'data' requires at least 2 arguments");
return;
}
if (pass > MP_PASS_SCOPE) {
mp_int_t bytesize = MP_PARSE_NODE_LEAF_SMALL_INT(pn_arg[0]);
for (uint j = 1; j < n_args; j++) {
if (!MP_PARSE_NODE_IS_SMALL_INT(pn_arg[j])) {
- compile_syntax_error(comp, nodes[i], "inline assembler 'data' requires integer arguments");
+ compile_syntax_error(comp, nodes[i], "'data' requires integer arguments");
return;
}
EMIT_INLINE_ASM_ARG(data, bytesize, MP_PARSE_NODE_LEAF_SMALL_INT(pn_arg[j]));