diff options
author | Rico Tzschichholz <ricotz@ubuntu.com> | 2019-01-10 09:55:11 +0100 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2019-01-10 12:44:45 +0100 |
commit | b2fd797bdfc8ee825c64b80b70d1c526472758ac (patch) | |
tree | b62d9979734429b17a2fc40ae5b3033f7cf84965 /codegen/valaccode.vala | |
parent | 704188bf81302862a45ed1b9a4ac336225598e50 (diff) | |
download | vala-b2fd797bdfc8ee825c64b80b70d1c526472758ac.tar.gz |
codegen: Add "error_pos" CCode attribute and use it as needed
This makes it possible to use non-standard error parameter positions
within the vala source.
Fixes https://gitlab.gnome.org/GNOME/vala/issues/728
Diffstat (limited to 'codegen/valaccode.vala')
-rw-r--r-- | codegen/valaccode.vala | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/codegen/valaccode.vala b/codegen/valaccode.vala index 2954b3e37..8e6b6b4a3 100644 --- a/codegen/valaccode.vala +++ b/codegen/valaccode.vala @@ -276,6 +276,10 @@ namespace Vala { } } + public static double get_ccode_error_pos (Callable c) { + return c.get_attribute_double ("CCode", "error_pos", -1); + } + public static bool get_ccode_array_length (CodeNode node) { return get_ccode_attribute(node).array_length; } |