aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/enzymatic.js2
-rw-r--r--src/parser.js13
-rw-r--r--tests/runner.py2
3 files changed, 14 insertions, 3 deletions
diff --git a/src/enzymatic.js b/src/enzymatic.js
index fd74bcc0..419cc73e 100644
--- a/src/enzymatic.js
+++ b/src/enzymatic.js
@@ -77,7 +77,7 @@ Substrate.prototype = {
outputs = zyme.process(selected);
//PROF();
} catch (e) {
- print("Exception, current selected are: " + selected.map(dump).join('\n\n').substr(0,100));
+ print("Exception, current selected are: " + selected.map(dump).join('\n\n'));
print("Stack: " + dump(new Error().stack));
throw e;
}
diff --git a/src/parser.js b/src/parser.js
index 05018e29..3e9e36b1 100644
--- a/src/parser.js
+++ b/src/parser.js
@@ -252,6 +252,12 @@ function parseBitcast(segment) {
return ret;
}
+function cleanOutTokens(filterOut, tokens, index) {
+ while (filterOut.indexOf(tokens[index].text) != -1) {
+ tokens.splice(index, 1);
+ }
+}
+
function _HexToInt(stringy) {
var ret = 0;
var mul = 1;
@@ -681,11 +687,16 @@ function intertyper(data) {
item.functionType += item.tokens[2].text;
item.tokens.splice(2, 1);
}
+ cleanOutTokens(['alignstack', 'alwaysinline', 'inlinehint', 'naked', 'noimplicitfloat', 'noinline', 'alwaysinline attribute.', 'noredzone', 'noreturn', 'nounwind', 'optsize', 'readnone', 'readonly', 'ssp', 'sspreq'], item.tokens, 4);
item.ident = item.tokens[2].text;
item.params = parseParamTokens(item.tokens[3].item[0].tokens);
item.toLabel = toNiceIdent(item.tokens[6].text);
item.unwindLabel = toNiceIdent(item.tokens[9].text);
- item.__result__ = true;
+ if (item.indent == 2) {
+ // standalone call - not in assign
+ item.standalone = true;
+ item.__result__ = true;
+ }
return [item];
},
});
diff --git a/tests/runner.py b/tests/runner.py
index dba9333a..68904978 100644
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -25,7 +25,7 @@ def timeout_run(proc, timeout, note):
return proc.communicate()[0]
class T(unittest.TestCase):
- def do_test(self, src, expected_output, args=[], output_processor=None, output_nicerizer=None, no_python=False, no_build=False, main_file=None):
+ def do_test(self, src, expected_output, args=[], output_nicerizer=None, output_processor=None, no_python=False, no_build=False, main_file=None):
global DEBUG
dirname = TEMP_DIR + '/tmp' # tempfile.mkdtemp(dir=TEMP_DIR)
if not os.path.exists(dirname):