diff options
author | Jürg Billeter <j@bitron.ch> | 2012-06-02 17:40:24 +0200 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2012-06-02 17:40:24 +0200 |
commit | 46ad2f001df736b78c2d1d6d38b688215a59bb80 (patch) | |
tree | cbe3cc0a0d052a7b93f8b837c6042a269fa45968 /vala/valareport.vala | |
parent | 1b9d1aa6f7abeacb13ac8fa97bb8e7ede453aec1 (diff) | |
download | vala-46ad2f001df736b78c2d1d6d38b688215a59bb80.tar.gz |
Use SourceLocation in SourceReference
Diffstat (limited to 'vala/valareport.vala')
-rw-r--r-- | vala/valareport.vala | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/vala/valareport.vala b/vala/valareport.vala index 66a1e9614..18169c58f 100644 --- a/vala/valareport.vala +++ b/vala/valareport.vala @@ -58,12 +58,12 @@ public class Vala.Report : Object { * Pretty-print the actual line of offending code if possible. */ static void report_source (SourceReference source) { - if (source.first_line != source.last_line) { + if (source.begin.line != source.end.line) { // FIXME Cannot report multi-line issues currently return; } - string offending_line = source.file.get_source_line (source.first_line); + string offending_line = source.file.get_source_line (source.begin.line); if (offending_line != null) { stderr.printf ("%s\n", offending_line); @@ -72,7 +72,7 @@ public class Vala.Report : Object { /* We loop in this manner so that we don't fall over on differing * tab widths. This means we get the ^s in the right places. */ - for (idx = 1; idx < source.first_column; ++idx) { + for (idx = 1; idx < source.begin.column; ++idx) { if (offending_line[idx - 1] == '\t') { stderr.printf ("\t"); } else { @@ -80,7 +80,7 @@ public class Vala.Report : Object { } } - for (idx = source.first_column; idx <= source.last_column; ++idx) { + for (idx = source.begin.column; idx <= source.end.column; ++idx) { if (offending_line[idx - 1] == '\t') { stderr.printf ("\t"); } else { |