}
public void parse_file (SourceFile source_file) {
+ var has_global_context = (context != null);
+ if (!has_global_context) {
+ context = source_file.context;
+ }
+
scanner = new Scanner (source_file);
scanner.parse_file_comments ();
scanner.indent_spaces = 0;
}
scanner = null;
+ if (!has_global_context) {
+ context = null;
+ }
}
void skip_symbol_name () throws ParseError {
}
public void parse_file (SourceFile source_file) {
+ var has_global_context = (context != null);
+ if (!has_global_context) {
+ context = source_file.context;
+ }
+
metadata_stack = new ArrayList<Metadata> ();
metadata = Metadata.empty;
cheader_filenames = null;
reader = null;
this.current_source_file = null;
+ if (!has_global_context) {
+ context = null;
+ }
}
void next () {
}
public override void visit_source_file (SourceFile source_file) {
- if (context.run_output || source_file.filename.has_suffix (".vala") || source_file.filename.has_suffix (".vapi")) {
+ if ((context != null && context.run_output) || source_file.filename.has_suffix (".vala") || source_file.filename.has_suffix (".vapi")) {
parse_file (source_file);
}
}
}
public void parse_file (SourceFile source_file) {
+ var has_global_context = (context != null);
+ if (!has_global_context) {
+ context = source_file.context;
+ }
+
scanner = new Scanner (source_file);
parse_file_comments ();
}
scanner = null;
+ if (!has_global_context) {
+ context = null;
+ }
}
void parse_file_comments () {