summaryrefslogtreecommitdiff
path: root/vala/valasourcefile.vala
diff options
context:
space:
mode:
authorRyan Lortie <desrt@desrt.ca>2010-08-24 19:01:39 +0200
committerJürg Billeter <j@bitron.ch>2010-09-09 15:54:17 +0200
commitb0a16279ff67cb54054d6c12c681abc4f4541f6f (patch)
tree8a97a5a15559b0bc6a1578622cd96ccb3aaa1cb9 /vala/valasourcefile.vala
parent3b5d28eafcff393571e45c3e73779d072e8382e1 (diff)
downloadvala-b0a16279ff67cb54054d6c12c681abc4f4541f6f.tar.gz
SourceFile: Introduce SourceFileType enumeration
SourceFileType has 2 possible values: SOURCE PACKAGE and replaces the CodeWriter.external_package boolean with a new field called 'file_type'.
Diffstat (limited to 'vala/valasourcefile.vala')
-rw-r--r--vala/valasourcefile.vala12
1 files changed, 8 insertions, 4 deletions
diff --git a/vala/valasourcefile.vala b/vala/valasourcefile.vala
index e58e009d4..ff4be85e9 100644
--- a/vala/valasourcefile.vala
+++ b/vala/valasourcefile.vala
@@ -40,7 +40,7 @@ public class Vala.SourceFile {
/**
* Specifies whether this file is a VAPI package file.
*/
- public bool external_package { get; set; }
+ public SourceFileType file_type { get; set; }
/**
* GIR Namespace for this source file, if it's a VAPI package
@@ -91,10 +91,10 @@ public class Vala.SourceFile {
* @param pkg true if this is a VAPI package file
* @return newly created source file
*/
- public SourceFile (CodeContext context, string filename, bool pkg = false, string? content = null) {
- this.filename = filename;
- this.external_package = pkg;
+ public SourceFile (CodeContext context, SourceFileType type, string filename, string? content = null) {
this.context = context;
+ this.file_type = type;
+ this.filename = filename;
this.content = content;
}
@@ -314,3 +314,7 @@ public class Vala.SourceFile {
}
}
+public enum SourceFileType {
+ SOURCE,
+ PACKAGE
+}