*/
using GLib;
-using Gee;
/**
* Represents a C code block.
*/
public bool suppress_newline { get; set; }
- private Gee.List<CCodeNode> statements = new ArrayList<CCodeNode> ();
+ private List<CCodeNode> statements = new ArrayList<CCodeNode> ();
/**
* Prepend the specified statement to the list of statements.
*/
using GLib;
-using Gee;
/**
* Represents a case block in a switch statement in C code.
*/
using GLib;
-using Gee;
/**
* Represents a comma separated expression list in the C code.
*/
public class Vala.CCodeCommaExpression : CCodeExpression {
- private Gee.List<CCodeExpression> inner = new ArrayList<CCodeExpression> ();
+ private List<CCodeExpression> inner = new ArrayList<CCodeExpression> ();
/**
* Appends the specified expression to the expression list.
inner.add (expr);
}
- public Gee.List<CCodeExpression> get_inner () {
+ public List<CCodeExpression> get_inner () {
return new ReadOnlyList<CCodeExpression> (inner);
}
*/
using GLib;
-using Gee;
/**
* Represents a local variable declaration in the C code.
*/
public CCodeModifiers modifiers { get; set; }
- private Gee.List<CCodeDeclarator> declarators = new ArrayList<CCodeDeclarator> ();
+ private List<CCodeDeclarator> declarators = new ArrayList<CCodeDeclarator> ();
public CCodeDeclaration (string type_name) {
this.type_name = type_name;
*/
using GLib;
-using Gee;
/**
* Represents an enum in the C code.
*/
public string name { get; set; }
- private Gee.List<CCodeEnumValue> values = new ArrayList<CCodeEnumValue> ();
+ private List<CCodeEnumValue> values = new ArrayList<CCodeEnumValue> ();
public CCodeEnum (string? name = null) {
this.name = name;
*/
using GLib;
-using Gee;
/**
* Represents an enum value in the C code.
*/
using GLib;
-using Gee;
/**
* Represents a for iteration statement in the C code.
*/
public CCodeStatement body { get; set; }
- private Gee.List<CCodeExpression> initializer = new ArrayList<CCodeExpression> ();
- private Gee.List<CCodeExpression> iterator = new ArrayList<CCodeExpression> ();
+ private List<CCodeExpression> initializer = new ArrayList<CCodeExpression> ();
+ private List<CCodeExpression> iterator = new ArrayList<CCodeExpression> ();
public CCodeForStatement (CCodeExpression? condition, CCodeStatement? body = null) {
this.condition = condition;
*/
using GLib;
-using Gee;
/**
* Represents a container for C code nodes.
*/
public class Vala.CCodeFragment : CCodeNode {
- private Gee.List<CCodeNode> children = new ArrayList<CCodeNode> ();
+ private List<CCodeNode> children = new ArrayList<CCodeNode> ();
/**
* Appends the specified code node to this code fragment.
*
* @return children list
*/
- public Gee.List<CCodeNode> get_children () {
+ public List<CCodeNode> get_children () {
return new ReadOnlyList<CCodeNode> (children);
}
*/
using GLib;
-using Gee;
/**
* Represents a function declaration in the C code.
*/
public CCodeBlock block { get; set; }
- private Gee.List<CCodeFormalParameter> parameters = new ArrayList<CCodeFormalParameter> ();
+ private List<CCodeFormalParameter> parameters = new ArrayList<CCodeFormalParameter> ();
public CCodeFunction (string name, string return_type = "void") {
this.name = name;
*/
using GLib;
-using Gee;
/**
* Represents a function call in the C code.
*/
public CCodeExpression? call { get; set; }
- private Gee.List<CCodeExpression> arguments = new ArrayList<CCodeExpression> ();
+ private List<CCodeExpression> arguments = new ArrayList<CCodeExpression> ();
public CCodeFunctionCall (CCodeExpression? call = null) {
this.call = call;
*
* @return list of arguments
*/
- public Gee.List<CCodeExpression> get_arguments () {
+ public List<CCodeExpression> get_arguments () {
return new ReadOnlyList<CCodeExpression> (arguments);
}
*/
using GLib;
-using Gee;
/**
* Represents a function pointer declarator in the C code.
*/
public string name { get; set; }
- private Gee.List<CCodeFormalParameter> parameters = new ArrayList<CCodeFormalParameter> ();
+ private List<CCodeFormalParameter> parameters = new ArrayList<CCodeFormalParameter> ();
public CCodeFunctionDeclarator (string name) {
this.name = name;
*/
using GLib;
-using Gee;
/**
* Represents a struct or array initializer list in the C code.
*/
public class Vala.CCodeInitializerList : CCodeExpression {
- private Gee.List<CCodeExpression> initializers = new ArrayList<CCodeExpression> ();
+ private List<CCodeExpression> initializers = new ArrayList<CCodeExpression> ();
/**
* Appends the specified expression to this initializer list.
*/
using GLib;
-using Gee;
/**
* Represents a struct declaration in the C code.
*/
public string name { get; set; }
- private Gee.List<CCodeDeclaration> declarations = new ArrayList<CCodeDeclaration> ();
+ private List<CCodeDeclaration> declarations = new ArrayList<CCodeDeclaration> ();
public CCodeStruct (string name) {
this.name = name;
*/
using GLib;
-using Gee;
/**
* Represents a switch selection statement in the C code.
* Raffaele Sandrini <raffaele@sandrini.ch>
*/
-using Gee;
internal class Vala.CCodeArrayModule : CCodeMethodCallModule {
int next_array_dup_id = 0;
}
if (array_expr is ArrayCreationExpression) {
- Gee.List<Expression> size = ((ArrayCreationExpression) array_expr).get_sizes ();
+ List<Expression> size = ((ArrayCreationExpression) array_expr).get_sizes ();
var length_expr = size[dim - 1];
return (CCodeExpression) get_ccodenode (length_expr);
} else if (array_expr is MethodCall || array_expr is CastExpression) {
- Gee.List<CCodeExpression> size = array_expr.get_array_sizes ();
+ List<CCodeExpression> size = array_expr.get_array_sizes ();
if (size.size >= dim) {
return size[dim - 1];
}
} else if (array_expr.symbol_reference is Property) {
var prop = (Property) array_expr.symbol_reference;
if (!prop.no_array_length) {
- Gee.List<CCodeExpression> size = array_expr.get_array_sizes ();
+ List<CCodeExpression> size = array_expr.get_array_sizes ();
if (size.size >= dim) {
return size[dim - 1];
}
public override void visit_element_access (ElementAccess expr) {
expr.accept_children (codegen);
- Gee.List<Expression> indices = expr.get_indices ();
+ List<Expression> indices = expr.get_indices ();
int rank = indices.size;
var container_type = expr.container.value_type.data_type;
*/
using GLib;
-using Gee;
/**
* The link between an assignment and generated code.
* Raffaele Sandrini <raffaele@sandrini.ch>
*/
-using Gee;
/**
* Code visitor generating C Code.
/* temporary variables that own their content */
public ArrayList<LocalVariable> temp_ref_vars = new ArrayList<LocalVariable> ();
/* cache to check whether a certain marshaller has been created yet */
- public Gee.Set<string> user_marshal_set;
+ public Set<string> user_marshal_set;
/* (constant) hash table with all predefined marshallers */
- public Gee.Set<string> predefined_marshal_set;
+ public Set<string> predefined_marshal_set;
/* (constant) hash table with all reserved identifiers in the generated code */
- Gee.Set<string> reserved_identifiers;
+ Set<string> reserved_identifiers;
public int next_temp_var_id = 0;
public bool in_creation_method { get { return current_method is CreationMethod; } }
var ma = new MemberAccess (this_access, f.name);
ma.symbol_reference = f;
- Gee.List<Expression> sizes = ((ArrayCreationExpression) f.initializer).get_sizes ();
+ List<Expression> sizes = ((ArrayCreationExpression) f.initializer).get_sizes ();
for (int dim = 1; dim <= array_type.rank; dim++) {
var array_len_lhs = head.get_array_length_cexpression (ma, dim);
var size = sizes[dim - 1];
var ma = new MemberAccess.simple (f.name);
ma.symbol_reference = f;
- Gee.List<Expression> sizes = ((ArrayCreationExpression) f.initializer).get_sizes ();
+ List<Expression> sizes = ((ArrayCreationExpression) f.initializer).get_sizes ();
for (int dim = 1; dim <= array_type.rank; dim++) {
var array_len_lhs = head.get_array_length_cexpression (ma, dim);
var size = sizes[dim - 1];
}
temp_vars.clear ();
- if (((Gee.List<LocalVariable>) temp_ref_vars).size == 0) {
+ if (((List<LocalVariable>) temp_ref_vars).size == 0) {
/* nothing to do without temporary variables */
return;
}
temp_ref_vars.clear ();
}
- public void append_temp_decl (CCodeFragment cfrag, Gee.List<LocalVariable> temp_vars) {
+ public void append_temp_decl (CCodeFragment cfrag, List<LocalVariable> temp_vars) {
foreach (LocalVariable local in temp_vars) {
if (current_method != null && current_method.coroutine) {
closure_struct.add_field (local.variable_type.get_cname (), local.name);
/* free temporary objects */
- if (((Gee.List<LocalVariable>) temp_vars).size == 0
+ if (((List<LocalVariable>) temp_vars).size == 0
&& pre_statement_fragment == null) {
/* nothing to do without temporary variables */
return;
temp_ref_vars.clear ();
}
- public void create_temp_decl (Statement stmt, Gee.List<LocalVariable> temp_vars) {
+ public void create_temp_decl (Statement stmt, List<LocalVariable> temp_vars) {
/* declare temporary variables */
if (temp_vars.size == 0) {
public virtual void generate_error_domain_declaration (ErrorDomain edomain, CCodeDeclarationSpace decl_space) {
}
- public void add_generic_type_arguments (Map<int,CCodeExpression> arg_map, Gee.List<DataType> type_args, CodeNode expr, bool is_chainup = false) {
+ public void add_generic_type_arguments (Map<int,CCodeExpression> arg_map, List<DataType> type_args, CodeNode expr, bool is_chainup = false) {
int type_param_index = 0;
foreach (var type_arg in type_args) {
arg_map.set (get_param_pos (0.1 * type_param_index + 0.01), get_type_id_expression (type_arg, is_chainup));
*/
using GLib;
-using Gee;
internal class Vala.CCodeControlFlowModule : CCodeMethodModule {
public CCodeControlFlowModule (CCodeGenerator codegen, CCodeModule? next) {
cswitchblock.append (new CCodeExpressionStatement (free_call));
}
- Gee.List<Statement> default_statements = null;
+ List<Statement> default_statements = null;
label_count = 0;
// generate nested if statements
* Jürg Billeter <j@bitron.ch>
*/
-using Gee;
class Vala.CCodeDeclarationSpace {
public bool is_header { get; set; }
* Raffaele Sandrini <raffaele@sandrini.ch>
*/
-using Gee;
/**
* The link between an assignment and generated code.
*/
using GLib;
-using Gee;
/**
* Code visitor generating C Code.
*/
using GLib;
-using Gee;
internal class Vala.CCodeMethodCallModule : CCodeAssignmentModule {
public CCodeMethodCallModule (CCodeGenerator codegen, CCodeModule? next) {
Method m = null;
Delegate deleg = null;
- Gee.List<FormalParameter> params;
+ List<FormalParameter> params;
var ma = expr.call as MemberAccess;
*/
using GLib;
-using Gee;
/**
* The link between a method and generated code.
* Jürg Billeter <j@bitron.ch>
*/
-using Gee;
/**
* Code visitor generating C Code.
return next.get_dynamic_signal_disconnect_wrapper_name (node);
}
- public virtual void generate_marshaller (Gee.List<FormalParameter> params, DataType return_type, bool dbus = false) {
+ public virtual void generate_marshaller (List<FormalParameter> params, DataType return_type, bool dbus = false) {
next.generate_marshaller (params, return_type, dbus);
}
- public virtual string get_marshaller_function (Gee.List<FormalParameter> params, DataType return_type, string? prefix = null, bool dbus = false) {
+ public virtual string get_marshaller_function (List<FormalParameter> params, DataType return_type, string? prefix = null, bool dbus = false) {
return next.get_marshaller_function (params, return_type, prefix, dbus);
}
*/
using GLib;
-using Gee;
/**
* The link between a dynamic method and generated code.
}
}
- bool has_dbus_error (Gee.List<DataType> error_types) {
+ bool has_dbus_error (List<DataType> error_types) {
foreach (DataType error_type in error_types) {
if (((ErrorType) error_type).error_domain.get_full_name () == "DBus.Error") {
return true;
return proxy_name;
}
- void generate_client_error_cases (CCodeBlock error_block, Gee.List<DataType> error_types, CCodeExpression dbus_error_name, CCodeExpression result_edomain, CCodeExpression result_ecode) {
+ void generate_client_error_cases (CCodeBlock error_block, List<DataType> error_types, CCodeExpression dbus_error_name, CCodeExpression result_edomain, CCodeExpression result_ecode) {
CCodeStatement if_else_if = null;
CCodeIfStatement last_statement = null;
*/
using GLib;
-using Gee;
/**
* The link between a dynamic method and generated code.
return wrapper_name;
}
- void generate_server_error_cases (CCodeBlock error_block, Gee.List<DataType> error_types, CCodeExpression error, CCodeExpression message, CCodeExpression reply) {
+ void generate_server_error_cases (CCodeBlock error_block, List<DataType> error_types, CCodeExpression error, CCodeExpression message, CCodeExpression reply) {
CCodeStatement if_else_if = null;
CCodeIfStatement last_statement = null;
*/
using GLib;
-using Gee;
internal class Vala.GAsyncModule : GSignalModule {
public GAsyncModule (CCodeGenerator codegen, CCodeModule? next) {
/* free temporary objects */
- if (((Gee.List<LocalVariable>) temp_vars).size == 0) {
+ if (((List<LocalVariable>) temp_vars).size == 0) {
/* nothing to do without temporary variables */
return;
}
*/
using GLib;
-using Gee;
internal class Vala.GErrorModule : CCodeDelegateModule {
private int current_try_id = 0;
*/
using GLib;
-using Gee;
/**
* Code visitor generating .gir file for the public interface.
private void write_c_includes (Namespace ns) {
// Collect C header filenames
- Gee.Set<string> header_filenames = new Gee.HashSet<string> (str_hash, str_equal);
+ Set<string> header_filenames = new HashSet<string> (str_hash, str_equal);
foreach (string c_header_filename in ns.get_cheader_filenames ()) {
header_filenames.add (c_header_filename);
}
}
}
- private void write_params_and_return (Gee.List<FormalParameter> params, DataType? return_type, bool return_array_length, bool constructor = false, DataType? instance_type = null) {
+ private void write_params_and_return (List<FormalParameter> params, DataType? return_type, bool return_array_length, bool constructor = false, DataType? instance_type = null) {
int last_index = 0;
if (params.size != 0 || instance_type != null || (return_type is ArrayType && return_array_length) || (return_type is DelegateType)) {
write_indent ();
}
}
- private void do_write_signature (Method m, string tag_name, bool instance, string name, string cname, Gee.List<Vala.FormalParameter> params, DataType return_type, bool can_fail) {
+ private void do_write_signature (Method m, string tag_name, bool instance, string name, string cname, List<Vala.FormalParameter> params, DataType return_type, bool can_fail) {
write_indent ();
stream.printf ("<%s name=\"%s\"", tag_name, name);
if (tag_name == "virtual-method") {
write_indent ();
stream.printf ("<type name=\"%s\" c:type=\"%s\"", gi_type_name (type.data_type), type.get_cname ());
- Gee.List<DataType> type_arguments = type.get_type_arguments ();
+ List<DataType> type_arguments = type.get_type_arguments ();
if (type_arguments.size == 0) {
stream.printf ("/>\n");
} else {
* Raffaele Sandrini <raffaele@sandrini.ch>
*/
-using Gee;
internal class Vala.GObjectModule : GTypeModule {
int dynamic_property_id;
* Raffaele Sandrini <raffaele@sandrini.ch>
*/
-using Gee;
internal class Vala.GSignalModule : GObjectModule {
public GSignalModule (CCodeGenerator codegen, CCodeModule? next) {
}
}
- public override string get_marshaller_function (Gee.List<FormalParameter> params, DataType return_type, string? prefix = null, bool dbus = false) {
+ public override string get_marshaller_function (List<FormalParameter> params, DataType return_type, string? prefix = null, bool dbus = false) {
var signature = get_marshaller_signature (params, return_type, dbus);
string ret;
}
}
- private string get_marshaller_signature (Gee.List<FormalParameter> params, DataType return_type, bool dbus = false) {
+ private string get_marshaller_signature (List<FormalParameter> params, DataType return_type, bool dbus = false) {
string signature;
signature = "%s:".printf (get_marshaller_type_name (return_type, dbus));
generate_marshaller (sig.get_parameters (), sig.return_type);
}
- public override void generate_marshaller (Gee.List<FormalParameter> params, DataType return_type, bool dbus = false) {
+ public override void generate_marshaller (List<FormalParameter> params, DataType return_type, bool dbus = false) {
string signature;
int n_params, i;
* Raffaele Sandrini <raffaele@sandrini.ch>
*/
-using Gee;
internal class Vala.GTypeModule : GErrorModule {
public GTypeModule (CCodeGenerator codegen, CCodeModule? next) {
geeincludedir = $(includedir)/vala-1.0
geeinclude_HEADERS = \
- gee.h \
+ valagee.h \
$(NULL)
gee.vapi gee.vala.stamp: $(libgee_la_VALASOURCES)
- $(VALAC) $(COVERAGE_VALAFLAGS) $(VALAFLAGS) -C --vapidir $(srcdir)/../vapi --pkg gobject-2.0 -H gee.h --library gee $^
+ $(VALAC) $(COVERAGE_VALAFLAGS) $(VALAFLAGS) -C --vapidir $(srcdir)/../vapi --pkg gobject-2.0 -H valagee.h --library gee $^
touch $@
libgee_la_LIBADD = \
MAINTAINERCLEANFILES = \
gee.vapi \
- gee.h \
+ valagee.h \
$(libgee_la_VALASOURCES:.vala=.c) \
$(NULL)
/**
* Arrays of arbitrary elements which grow automatically as elements are added.
*/
-public class Gee.ArrayList<G> : CollectionObject, Iterable<G>, Collection<G>, List<G> {
+public class Vala.ArrayList<G> : CollectionObject, Iterable<G>, Collection<G>, List<G> {
public int size {
get { return _size; }
}
return typeof (G);
}
- public Gee.Iterator<G> iterator () {
+ public Vala.Iterator<G> iterator () {
return new Iterator<G> (this);
}
_items.resize (value);
}
- private class Iterator<G> : CollectionObject, Gee.Iterator<G> {
+ private class Iterator<G> : CollectionObject, Vala.Iterator<G> {
public ArrayList<G> list {
set {
_list = value;
* Serves as the base interface for implementing collection classes. Defines
* size, iteration, and modification methods.
*/
-public interface Gee.Collection<G> : Iterable<G> {
+public interface Vala.Collection<G> : Iterable<G> {
/**
* The number of items in this collection.
*/
/**
* Base class for all collections.
*/
-public class Gee.CollectionObject {
+public class Vala.CollectionObject {
}
/**
* Hashtable implementation of the Map interface.
*/
-public class Gee.HashMap<K,V> : CollectionObject, Map<K,V> {
+public class Vala.HashMap<K,V> : CollectionObject, Map<K,V> {
public int size {
get { return _nnodes; }
}
/**
* Hashtable implementation of the Set interface.
*/
-public class Gee.HashSet<G> : CollectionObject, Iterable<G>, Collection<G>, Set<G> {
+public class Vala.HashSet<G> : CollectionObject, Iterable<G>, Collection<G>, Set<G> {
public int size {
get { return _nnodes; }
}
return typeof (G);
}
- public Gee.Iterator<G> iterator () {
+ public Vala.Iterator<G> iterator () {
return new Iterator<G> (this);
}
}
}
- private class Iterator<G> : CollectionObject, Gee.Iterator<G> {
+ private class Iterator<G> : CollectionObject, Vala.Iterator<G> {
public HashSet<G> set {
set {
_set = value;
* Implemented by classes that support a simple iteration over instances of the
* collection.
*/
-public interface Gee.Iterable<G> : CollectionObject {
+public interface Vala.Iterable<G> : CollectionObject {
public abstract Type get_element_type ();
/**
* Implemented by classes that support a simple iteration over instances of the
* collection.
*/
-public interface Gee.Iterator<G> : CollectionObject {
+public interface Vala.Iterator<G> : CollectionObject {
/**
* Advances to the next element in the iteration.
*
/**
* Represents a collection of items in a well-defined order.
*/
-public interface Gee.List<G> : Collection<G> {
+public interface Vala.List<G> : Collection<G> {
/**
* Returns the item at the specified index in this list.
*
/**
* A map is a generic collection of key/value pairs.
*/
-public interface Gee.Map<K,V> : CollectionObject {
+public interface Vala.Map<K,V> : CollectionObject {
/**
* The number of items in this map.
*/
/**
* Represents a read-only collection of items.
*/
-public class Gee.ReadOnlyCollection<G> : CollectionObject, Iterable<G>, Collection<G> {
+public class Vala.ReadOnlyCollection<G> : CollectionObject, Iterable<G>, Collection<G> {
public int size {
get { return _collection.size; }
}
return typeof (G);
}
- public Gee.Iterator<G> iterator () {
+ public Vala.Iterator<G> iterator () {
if (_collection == null) {
return new Iterator<G> ();
}
assert_not_reached ();
}
- private class Iterator<G> : CollectionObject, Gee.Iterator<G> {
+ private class Iterator<G> : CollectionObject, Vala.Iterator<G> {
public bool next () {
return false;
}
/**
* Represents a read-only collection of items in a well-defined order.
*/
-public class Gee.ReadOnlyList<G> : CollectionObject, Iterable<G>, Collection<G>, List<G> {
+public class Vala.ReadOnlyList<G> : CollectionObject, Iterable<G>, Collection<G>, List<G> {
public int size {
get { return _list.size; }
}
return typeof (G);
}
- public Gee.Iterator<G> iterator () {
+ public Vala.Iterator<G> iterator () {
if (_list == null) {
return new Iterator<G> ();
}
assert_not_reached ();
}
- class Iterator<G> : CollectionObject, Gee.Iterator<G> {
+ class Iterator<G> : CollectionObject, Vala.Iterator<G> {
public bool next () {
return false;
}
/**
* Represents a read-only collection of key/value pairs.
*/
-public class Gee.ReadOnlyMap<K,V> : CollectionObject, Map<K,V> {
+public class Vala.ReadOnlyMap<K,V> : CollectionObject, Map<K,V> {
public int size {
get { return _map.size; }
}
/**
* Represents a read-only collection of items without duplicates.
*/
-public class Gee.ReadOnlySet<G> : CollectionObject, Iterable<G>, Collection<G>, Set<G> {
+public class Vala.ReadOnlySet<G> : CollectionObject, Iterable<G>, Collection<G>, Set<G> {
public int size {
get { return _set.size; }
}
return typeof (G);
}
- public Gee.Iterator<G> iterator () {
+ public Vala.Iterator<G> iterator () {
if (_set == null) {
return new Iterator<G> ();
}
assert_not_reached ();
}
- private class Iterator<G> : CollectionObject, Gee.Iterator<G> {
+ private class Iterator<G> : CollectionObject, Vala.Iterator<G> {
public bool next () {
return false;
}
/**
* A set is a collection without duplicates.
*/
-public interface Gee.Set<G> : Collection<G> {
+public interface Vala.Set<G> : Collection<G> {
}
*/
using GLib;
-using Gee;
/**
* Represents an array creation expression e.g. "new int[] {1,2,3}".
/**
* The size for each dimension ascending from left to right.
*/
- private Gee.List<Expression> sizes = new ArrayList<Expression> ();
+ private List<Expression> sizes = new ArrayList<Expression> ();
/**
* The root array initializer list.
/**
* Get the sizes for all dimensions ascending from left to right.
*/
- public Gee.List<Expression> get_sizes () {
+ public List<Expression> get_sizes () {
return new ReadOnlyList<Expression> (sizes);
}
}
}
- private int create_sizes_from_initializer_list (SemanticAnalyzer analyzer, InitializerList il, int rank, Gee.List<Literal> sl) {
+ private int create_sizes_from_initializer_list (SemanticAnalyzer analyzer, InitializerList il, int rank, List<Literal> sl) {
if (sl.size == (this.rank - rank)) {
// only add size if this is the first initializer list of the current dimension
var init = new IntegerLiteral (il.size.to_string (), il.source_reference);
checked = true;
- Gee.List<Expression> sizes = get_sizes ();
+ List<Expression> sizes = get_sizes ();
var initlist = initializer_list;
if (element_type != null) {
}
}
- public override Gee.List<Symbol> get_symbols () {
+ public override List<Symbol> get_symbols () {
return element_type.get_symbols ();
}
* Jürg Billeter <j@bitron.ch>
*/
-using Gee;
/**
* Represents an assignment expression in the source code.
*/
using GLib;
-using Gee;
/**
* Represents an attribute specified in the source code.
/**
* Contains all specified attribute arguments.
*/
- public Gee.Map<string,Expression> args = new Gee.HashMap<string,Expression> (str_hash, str_equal);
+ public Vala.Map<string,Expression> args = new HashMap<string,Expression> (str_hash, str_equal);
/**
* Creates a new attribute.
* Jürg Billeter <j@bitron.ch>
*/
-using Gee;
/**
* Represents an access to base class members in the source code.
*/
using GLib;
-using Gee;
/**
* Represents a basic block, i.e. a straight-line piece of code without any
* jumps or jump targets.
*/
public class Vala.BasicBlock {
- private Gee.List<CodeNode> nodes = new ArrayList<CodeNode> ();
+ private List<CodeNode> nodes = new ArrayList<CodeNode> ();
// control flow graph
- private Gee.List<weak BasicBlock> predecessors = new ArrayList<weak BasicBlock> ();
- private Gee.List<BasicBlock> successors = new ArrayList<BasicBlock> ();
+ private List<weak BasicBlock> predecessors = new ArrayList<weak BasicBlock> ();
+ private List<BasicBlock> successors = new ArrayList<BasicBlock> ();
// dominator tree
public BasicBlock parent { get; private set; }
- Gee.List<BasicBlock> children = new ArrayList<BasicBlock> ();
+ List<BasicBlock> children = new ArrayList<BasicBlock> ();
Set<BasicBlock> df = new HashSet<BasicBlock> ();
Set<PhiFunction> phi_functions = new HashSet<PhiFunction> ();
nodes.add (node);
}
- public Gee.List<CodeNode> get_nodes () {
+ public List<CodeNode> get_nodes () {
return nodes;
}
}
}
- public Gee.List<weak BasicBlock> get_predecessors () {
+ public List<weak BasicBlock> get_predecessors () {
return new ReadOnlyList<weak BasicBlock> (predecessors);
}
- public Gee.List<weak BasicBlock> get_successors () {
+ public List<weak BasicBlock> get_successors () {
return new ReadOnlyList<weak BasicBlock> (successors);
}
block.parent = this;
}
- public Gee.List<BasicBlock> get_children () {
+ public List<BasicBlock> get_children () {
return children;
}
df.add (block);
}
- public Gee.Set<BasicBlock> get_dominator_frontier () {
+ public Set<BasicBlock> get_dominator_frontier () {
return df;
}
phi_functions.add (phi);
}
- public Gee.Set<PhiFunction> get_phi_functions () {
+ public Set<PhiFunction> get_phi_functions () {
return phi_functions;
}
}
* Jürg Billeter <j@bitron.ch>
*/
-using Gee;
/**
* Represents an expression with two operands in the source code.
*/
using GLib;
-using Gee;
/**
* Represents a source code block.
public bool captured { get; set; }
- private Gee.List<Statement> statement_list = new ArrayList<Statement> ();
- private Gee.List<LocalVariable> local_variables = new ArrayList<LocalVariable> ();
+ private List<Statement> statement_list = new ArrayList<Statement> ();
+ private List<LocalVariable> local_variables = new ArrayList<LocalVariable> ();
/**
* Creates a new block.
*
* @return statement list
*/
- public Gee.List<Statement> get_statements () {
+ public List<Statement> get_statements () {
var list = new ArrayList<Statement> ();
foreach (Statement stmt in statement_list) {
var stmt_list = stmt as StatementList;
*
* @return variable declarator list
*/
- public Gee.List<LocalVariable> get_local_variables () {
+ public List<LocalVariable> get_local_variables () {
return new ReadOnlyList<LocalVariable> (local_variables);
}
* Jürg Billeter <j@bitron.ch>
*/
-using Gee;
/**
* Represents a type cast in the source code.
* Jürg Billeter <j@bitron.ch>
*/
-using Gee;
/**
* Represents a catch clause in a try statement in the source code.
*/
using GLib;
-using Gee;
/**
* Represents a class declaration in the source code.
private bool _is_compact;
private bool _is_immutable;
- private Gee.List<DataType> base_types = new ArrayList<DataType> ();
+ private List<DataType> base_types = new ArrayList<DataType> ();
- private Gee.List<Constant> constants = new ArrayList<Constant> ();
- private Gee.List<Field> fields = new ArrayList<Field> ();
- private Gee.List<Method> methods = new ArrayList<Method> ();
- private Gee.List<Property> properties = new ArrayList<Property> ();
- private Gee.List<Signal> signals = new ArrayList<Signal> ();
+ private List<Constant> constants = new ArrayList<Constant> ();
+ private List<Field> fields = new ArrayList<Field> ();
+ private List<Method> methods = new ArrayList<Method> ();
+ private List<Property> properties = new ArrayList<Property> ();
+ private List<Signal> signals = new ArrayList<Signal> ();
// inner types
- private Gee.List<Class> classes = new ArrayList<Class> ();
- private Gee.List<Struct> structs = new ArrayList<Struct> ();
- private Gee.List<Enum> enums = new ArrayList<Enum> ();
- private Gee.List<Delegate> delegates = new ArrayList<Delegate> ();
+ private List<Class> classes = new ArrayList<Class> ();
+ private List<Struct> structs = new ArrayList<Struct> ();
+ private List<Enum> enums = new ArrayList<Enum> ();
+ private List<Delegate> delegates = new ArrayList<Delegate> ();
/**
* Returns a copy of the list of classes.
*
* @return list of classes
*/
- public Gee.List<Class> get_classes () {
+ public List<Class> get_classes () {
return new ReadOnlyList<Class> (classes);
}
*
* @return list of structs
*/
- public Gee.List<Struct> get_structs () {
+ public List<Struct> get_structs () {
return new ReadOnlyList<Struct> (structs);
}
*
* @return list of enums
*/
- public Gee.List<Enum> get_enums () {
+ public List<Enum> get_enums () {
return new ReadOnlyList<Enum> (enums);
}
*
* @return list of delegates
*/
- public Gee.List<Delegate> get_delegates () {
+ public List<Delegate> get_delegates () {
return new ReadOnlyList<Delegate> (delegates);
}
*
* @return list of base types
*/
- public Gee.List<DataType> get_base_types () {
+ public List<DataType> get_base_types () {
return new ReadOnlyList<DataType> (base_types);
}
*
* @return list of fields
*/
- public Gee.List<Field> get_fields () {
+ public List<Field> get_fields () {
return new ReadOnlyList<Field> (fields);
}
*
* @return list of constants
*/
- public Gee.List<Constant> get_constants () {
+ public List<Constant> get_constants () {
return new ReadOnlyList<Constant> (constants);
}
*
* @return list of methods
*/
- public override Gee.List<Method> get_methods () {
+ public override List<Method> get_methods () {
return new ReadOnlyList<Method> (methods);
}
*
* @return list of properties
*/
- public override Gee.List<Property> get_properties () {
+ public override List<Property> get_properties () {
return new ReadOnlyList<Property> (properties);
}
*
* @return list of signals
*/
- public override Gee.List<Signal> get_signals () {
+ public override List<Signal> get_signals () {
return new ReadOnlyList<Signal> (signals);
}
}
}
- private void get_all_prerequisites (Interface iface, Gee.List<TypeSymbol> list) {
+ private void get_all_prerequisites (Interface iface, List<TypeSymbol> list) {
foreach (DataType prereq in iface.get_prerequisites ()) {
TypeSymbol type = prereq.data_type;
/* skip on previous errors */
}
/* gather all prerequisites */
- Gee.List<TypeSymbol> prerequisites = new ArrayList<TypeSymbol> ();
+ List<TypeSymbol> prerequisites = new ArrayList<TypeSymbol> ();
foreach (DataType base_type in get_base_types ()) {
if (base_type.data_type is Interface) {
get_all_prerequisites ((Interface) base_type.data_type, prerequisites);
}
}
/* check whether all prerequisites are met */
- Gee.List<string> missing_prereqs = new ArrayList<string> ();
+ List<string> missing_prereqs = new ArrayList<string> ();
foreach (TypeSymbol prereq in prerequisites) {
if (!class_is_a (this, prereq)) {
missing_prereqs.insert (0, prereq.get_full_name ());
*/
using GLib;
-using Gee;
/**
* The root of the code tree.
public string entry_point_name { get; set; }
- private Gee.List<SourceFile> source_files = new ArrayList<SourceFile> ();
- private Gee.List<string> c_source_files = new ArrayList<string> ();
+ private List<SourceFile> source_files = new ArrayList<SourceFile> ();
+ private List<string> c_source_files = new ArrayList<string> ();
private Namespace _root = new Namespace (null);
- private Gee.List<string> packages = new ArrayList<string> (str_equal);
+ private List<string> packages = new ArrayList<string> (str_equal);
private Set<string> defines = new HashSet<string> (str_hash, str_equal);
* Return the topmost context from the context stack.
*/
public static CodeContext get () {
- Gee.List<CodeContext>* context_stack = context_stack_key.get ();
+ List<CodeContext>* context_stack = context_stack_key.get ();
return context_stack->get (context_stack->size - 1);
}
* Push the specified context to the context stack.
*/
public static void push (CodeContext context) {
- Gee.List<CodeContext>* context_stack = context_stack_key.get ();
+ List<CodeContext>* context_stack = context_stack_key.get ();
if (context_stack == null) {
context_stack = new ArrayList<CodeContext> ();
context_stack_key.set (context_stack, null);
* Remove the topmost context from the context stack.
*/
public static void pop () {
- Gee.List<CodeContext>* context_stack = context_stack_key.get ();
+ List<CodeContext>* context_stack = context_stack_key.get ();
context_stack->remove_at (context_stack->size - 1);
}
*
* @return list of source files
*/
- public Gee.List<SourceFile> get_source_files () {
+ public List<SourceFile> get_source_files () {
return new ReadOnlyList<SourceFile> (source_files);
}
*
* @return list of C source files
*/
- public Gee.List<string> get_c_source_files () {
+ public List<string> get_c_source_files () {
return new ReadOnlyList<string> (c_source_files);
}
*
* @return list of used packages
*/
- public Gee.List<string> get_packages () {
+ public List<string> get_packages () {
return new ReadOnlyList<string> (packages);
}
*/
using GLib;
-using Gee;
/**
* Represents a part of the parsed source code.
get { return _error_types != null && _error_types.size > 0; }
}
- private Gee.List<DataType> _error_types;
- private static Gee.List<DataType> _empty_type_list;
+ private List<DataType> _error_types;
+ private static List<DataType> _empty_type_list;
private CCodeNode? _ccodenode;
/**
* Specifies the exceptions that can be thrown by this node or a child node
*/
- public Gee.List<DataType> get_error_types () {
+ public List<DataType> get_error_types () {
if (_error_types != null) {
return _error_types;
}
* Adds a collection of error types to the exceptions that can be thrown by this node
* or a child node
*/
- public void add_error_types (Gee.List<DataType> error_types) {
+ public void add_error_types (List<DataType> error_types) {
foreach (DataType error_type in error_types) {
add_error_type (error_type);
}
* Raffaele Sandrini <raffaele@sandrini.ch>
*/
-using Gee;
/**
* Code visitor generating Vala API file for the public interface.
write_newline ();
}
- void visit_sorted (Gee.List<Symbol> symbols) {
- var sorted_symbols = new Gee.ArrayList<Symbol> ();
+ void visit_sorted (List<Symbol> symbols) {
+ var sorted_symbols = new ArrayList<Symbol> ();
foreach (Symbol sym in symbols) {
int left = 0;
int right = sorted_symbols.size - 1;
write_newline ();
}
- private void write_error_domains (Gee.List<DataType> error_domains) {
+ private void write_error_domains (List<DataType> error_domains) {
if (error_domains.size > 0) {
write_string (" throws ");
return ((int) (d1 * 1000)) == ((int) (d2 * 1000));
}
- private void write_params (Gee.List<FormalParameter> params) {
+ private void write_params (List<FormalParameter> params) {
write_string ("(");
int i = 1;
*/
using GLib;
-using Gee;
/**
* A reference to a data type. This is used to specify static types of
*/
public bool is_dynamic { get; set; }
- private Gee.List<DataType> type_argument_list;
- private static Gee.List<DataType> _empty_type_list;
+ private List<DataType> type_argument_list;
+ private static List<DataType> _empty_type_list;
/**
* Appends the specified type as generic type argument.
*
* @return type argument list
*/
- public Gee.List<DataType> get_type_arguments () {
+ public List<DataType> get_type_arguments () {
if (type_argument_list != null) {
return type_argument_list;
}
*
* @return parameter list
*/
- public virtual Gee.List<FormalParameter>? get_parameters () {
+ public virtual List<FormalParameter>? get_parameters () {
return null;
}
*
* @return symbol list
*/
- public virtual Gee.List<Symbol> get_symbols () {
+ public virtual List<Symbol> get_symbols () {
var symbols = new ArrayList<Symbol> ();
if (data_type != null) {
symbols.add (data_type);
* Jürg Billeter <j@bitron.ch>
*/
-using Gee;
/**
* Represents a local variable or constant declaration statement in the source code.
*/
using GLib;
-using Gee;
/**
* Represents a function callback type.
*/
public bool array_null_terminated { get; set; }
- private Gee.List<TypeParameter> type_parameters = new ArrayList<TypeParameter> ();
+ private List<TypeParameter> type_parameters = new ArrayList<TypeParameter> ();
- private Gee.List<FormalParameter> parameters = new ArrayList<FormalParameter> ();
+ private List<FormalParameter> parameters = new ArrayList<FormalParameter> ();
private string cname;
private DataType _return_type;
*
* @return parameter list
*/
- public Gee.List<FormalParameter> get_parameters () {
+ public List<FormalParameter> get_parameters () {
return new ReadOnlyList<FormalParameter> (parameters);
}
*/
using GLib;
-using Gee;
/**
* The type of an instance of a delegate.
return delegate_symbol.return_type;
}
- public override Gee.List<FormalParameter>? get_parameters () {
+ public override List<FormalParameter>? get_parameters () {
return delegate_symbol.get_parameters ();
}
return delegate_symbol.get_cname ();
}
- public override Gee.List<Symbol> get_symbols () {
+ public override List<Symbol> get_symbols () {
var symbols = new ArrayList<Symbol> ();
symbols.add (delegate_symbol);
return symbols;
*/
using GLib;
-using Gee;
/**
* Represents a late bound method.
this.dynamic_type = dynamic_type;
}
- public override Gee.List<string> get_cheader_filenames () {
+ public override List<string> get_cheader_filenames () {
return new ArrayList<string> ();
}
*/
using GLib;
-using Gee;
/**
* Represents a late bound property.
this.dynamic_type = dynamic_type;
}
- public override Gee.List<string> get_cheader_filenames () {
+ public override List<string> get_cheader_filenames () {
return new ArrayList<string> ();
}
*/
using GLib;
-using Gee;
/**
* Represents an array access expression e.g. "a[1,2]".
/**
* Expressions representing the indices we want to access inside the container.
*/
- private Gee.List<Expression> indices = new ArrayList<Expression> ();
+ private List<Expression> indices = new ArrayList<Expression> ();
Expression _container;
index.parent_node = this;
}
- public Gee.List<Expression> get_indices () {
+ public List<Expression> get_indices () {
return new ReadOnlyList<Expression> (indices);
}
*/
using GLib;
-using Gee;
/**
* Represents an enum declaration in the source code.
*/
public bool has_type_id { get; set; default = true; }
- private Gee.List<EnumValue> values = new ArrayList<EnumValue> ();
- private Gee.List<Method> methods = new ArrayList<Method> ();
+ private List<EnumValue> values = new ArrayList<EnumValue> ();
+ private List<Method> methods = new ArrayList<Method> ();
private string cname;
private string cprefix;
private string lower_case_cprefix;
*
* @return list of enum values
*/
- public Gee.List<EnumValue> get_values () {
+ public List<EnumValue> get_values () {
return new ReadOnlyList<EnumValue> (values);
}
*
* @return list of methods
*/
- public Gee.List<Method> get_methods () {
+ public List<Method> get_methods () {
return new ReadOnlyList<Method> (methods);
}
*/
using GLib;
-using Gee;
/**
* Represents an error domain declaration in the source code.
*/
public class Vala.ErrorDomain : TypeSymbol {
- private Gee.List<ErrorCode> codes = new ArrayList<ErrorCode> ();
- private Gee.List<Method> methods = new ArrayList<Method> ();
+ private List<ErrorCode> codes = new ArrayList<ErrorCode> ();
+ private List<Method> methods = new ArrayList<Method> ();
private string cname;
private string cprefix;
private string lower_case_cprefix;
*
* @return list of error codes
*/
- public Gee.List<ErrorCode> get_codes () {
+ public List<ErrorCode> get_codes () {
return new ReadOnlyList<ErrorCode> (codes);
}
*
* @return list of methods
*/
- public Gee.List<Method> get_methods () {
+ public List<Method> get_methods () {
return new ReadOnlyList<Method> (methods);
}
*/
using GLib;
-using Gee;
/**
* Base class for all code nodes that might be used as an expression.
*/
public ArrayList<LocalVariable> temp_vars = new ArrayList<LocalVariable> ();
- private Gee.List<CCodeExpression> array_sizes = new ArrayList<CCodeExpression> ();
+ private List<CCodeExpression> array_sizes = new ArrayList<CCodeExpression> ();
public CCodeExpression? delegate_target { get; set; }
public CCodeExpression? delegate_target_destroy_notify { get; set; }
* Get the C code expression for array sizes for all dimensions
* ascending from left to right.
*/
- public Gee.List<CCodeExpression> get_array_sizes () {
+ public List<CCodeExpression> get_array_sizes () {
return new ReadOnlyList<CCodeExpression> (array_sizes);
}
* Jürg Billeter <j@bitron.ch>
*/
-using Gee;
/**
* A code statement that evaluates a given expression. The value computed by the
*/
using GLib;
-using Gee;
/**
* Represents a type or namespace field.
*/
using GLib;
-using Gee;
/**
* Code visitor building the control flow graph.
private CodeContext context;
private BasicBlock current_block;
private bool unreachable_reported;
- private Gee.List<JumpTarget> jump_stack = new ArrayList<JumpTarget> ();
+ private List<JumpTarget> jump_stack = new ArrayList<JumpTarget> ();
- Map<Symbol, Gee.List<LocalVariable>> var_map;
+ Map<Symbol, List<LocalVariable>> var_map;
Set<LocalVariable> used_vars;
Map<LocalVariable, PhiFunction> phi_functions;
check_variables (m.entry_block);
}
- Gee.List<BasicBlock> get_depth_first_list (BasicBlock entry_block) {
+ List<BasicBlock> get_depth_first_list (BasicBlock entry_block) {
var list = new ArrayList<BasicBlock> ();
depth_first_traverse (entry_block, list);
return list;
}
- void depth_first_traverse (BasicBlock current, Gee.List<BasicBlock> list) {
+ void depth_first_traverse (BasicBlock current, List<BasicBlock> list) {
if (current in list) {
return;
}
}
void check_variables (BasicBlock entry_block) {
- var_map = new HashMap<Symbol, Gee.List<LocalVariable>>();
+ var_map = new HashMap<Symbol, List<LocalVariable>>();
used_vars = new HashSet<LocalVariable> ();
phi_functions = new HashMap<LocalVariable, PhiFunction> ();
}
}
- LocalVariable process_assignment (Map<Symbol, Gee.List<LocalVariable>> var_map, LocalVariable var_symbol) {
+ LocalVariable process_assignment (Map<Symbol, List<LocalVariable>> var_map, LocalVariable var_symbol) {
var variable_stack = var_map.get (var_symbol);
if (variable_stack == null) {
variable_stack = new ArrayList<LocalVariable> ();
}
// remove catch clauses from jump stack
- Gee.List<JumpTarget> catch_stack = new ArrayList<JumpTarget> ();
+ List<JumpTarget> catch_stack = new ArrayList<JumpTarget> ();
for (int i = jump_stack.size - 1; i >= finally_jump_stack_size; i--) {
var jump_target = jump_stack[i];
catch_stack.add (jump_target);
* Jürg Billeter <j@bitron.ch>
*/
-using Gee;
/**
* Represents a foreach statement in the source code. Foreach statements iterate
*/
using GLib;
-using Gee;
/**
* Represents a formal parameter in method and callback signatures.
*/
using GLib;
-using Gee;
/**
* Represents a for iteration statement in the source code.
}
}
- private Gee.List<Expression> initializer = new ArrayList<Expression> ();
- private Gee.List<Expression> iterator = new ArrayList<Expression> ();
+ private List<Expression> initializer = new ArrayList<Expression> ();
+ private List<Expression> iterator = new ArrayList<Expression> ();
private Expression _condition;
private Block _body;
*
* @return initializer list
*/
- public Gee.List<Expression> get_initializer () {
+ public List<Expression> get_initializer () {
return new ReadOnlyList<Expression> (initializer);
}
*
* @return iterator
*/
- public Gee.List<Expression> get_iterator () {
+ public List<Expression> get_iterator () {
return new ReadOnlyList<Expression> (iterator);
}
*/
using GLib;
-using Gee;
/**
return type;
}
- Gee.List<DataType> type_arg_list = null;
+ List<DataType> type_arg_list = null;
UnresolvedSymbol sym = null;
bool is_dynamic = accept (TokenType.DYNAMIC);
}
- Gee.List<Expression> parse_argument_list () throws ParseError {
+ List<Expression> parse_argument_list () throws ParseError {
var list = new ArrayList<Expression> ();
if (current () != TokenType.CLOSE_PARENS) {
do {
Expression parse_simple_name () throws ParseError {
var begin = get_location ();
string id = parse_identifier ();
- Gee.List<DataType> type_arg_list = parse_type_argument_list (true);
+ List<DataType> type_arg_list = parse_type_argument_list (true);
var expr = new MemberAccess (null, id, get_src (begin));
if (type_arg_list != null) {
foreach (DataType type_arg in type_arg_list) {
Expression parse_member_access (SourceLocation begin, Expression inner) throws ParseError {
expect (TokenType.DOT);
string id = parse_identifier ();
- Gee.List<DataType> type_arg_list = parse_type_argument_list (true);
+ List<DataType> type_arg_list = parse_type_argument_list (true);
var expr = new MemberAccess (inner, id, get_src (begin));
if (type_arg_list != null) {
foreach (DataType type_arg in type_arg_list) {
Expression parse_pointer_member_access (SourceLocation begin, Expression inner) throws ParseError {
expect (TokenType.OP_PTR);
string id = parse_identifier ();
- Gee.List<DataType> type_arg_list = parse_type_argument_list (true);
+ List<DataType> type_arg_list = parse_type_argument_list (true);
var expr = new MemberAccess.pointer (inner, id, get_src (begin));
if (type_arg_list != null) {
foreach (DataType type_arg in type_arg_list) {
}
- Gee.List<Expression> parse_print_argument_list () throws ParseError {
+ List<Expression> parse_print_argument_list () throws ParseError {
var list = new ArrayList<Expression> ();
var i = 0;
var begin = get_location ();
return expr;
}
- Gee.List<Expression> parse_expression_list () throws ParseError {
+ List<Expression> parse_expression_list () throws ParseError {
var list = new ArrayList<Expression> ();
do {
list.add (parse_expression ());
Expression parse_object_creation_expression (SourceLocation begin, MemberAccess member) throws ParseError {
member.creation_member = true;
- Gee.List<Expression> arg_list;
+ List<Expression> arg_list;
if (accept (TokenType.OPEN_PARENS)) {
arg_list = parse_argument_list ();
expect (TokenType.CLOSE_PARENS);
Expression parse_array_creation_expression (SourceLocation begin, DataType element_type) throws ParseError {
bool size_specified = false;
- Gee.List<Expression> size_specifier_list = null;
+ List<Expression> size_specifier_list = null;
bool first = true;
DataType etype = element_type.copy ();
}
- Gee.List<MemberInitializer> parse_object_initializer () throws ParseError {
+ List<MemberInitializer> parse_object_initializer () throws ParseError {
var list = new ArrayList<MemberInitializer> ();
if (accept (TokenType.OPEN_BRACE)) {
do {
Expression parse_lambda_expression () throws ParseError {
var begin = get_location ();
- Gee.List<string> params = new ArrayList<string> ();
+ List<string> params = new ArrayList<string> ();
expect (TokenType.DEF);
return stmt;
}
- void parse_catch_clauses (Gee.List<CatchClause> catch_clauses) throws ParseError {
+ void parse_catch_clauses (List<CatchClause> catch_clauses) throws ParseError {
while (accept (TokenType.EXCEPT)) {
var begin = get_location ();
DataType type = null;
return new DeleteStatement (expr, get_src (begin));
}
- Gee.List<Attribute>? parse_attributes () throws ParseError {
+ List<Attribute>? parse_attributes () throws ParseError {
if (current () != TokenType.OPEN_BRACKET) {
return null;
}
return attrs;
}
- void set_attributes (CodeNode node, Gee.List<Attribute>? attributes) {
+ void set_attributes (CodeNode node, List<Attribute>? attributes) {
if (attributes != null) {
- foreach (Attribute attr in (Gee.List<Attribute>) attributes) {
+ foreach (Attribute attr in (List<Attribute>) attributes) {
node.attributes.append (attr);
}
}
return RecoveryState.EOF;
}
- Namespace parse_namespace_declaration (Gee.List<Attribute>? attrs) throws ParseError {
+ Namespace parse_namespace_declaration (List<Attribute>? attrs) throws ParseError {
var begin = get_location ();
expect (TokenType.NAMESPACE);
var sym = parse_symbol_name ();
}
- Symbol parse_class_declaration (Gee.List<Attribute>? attrs) throws ParseError {
+ Symbol parse_class_declaration (List<Attribute>? attrs) throws ParseError {
var begin = get_location ();
expect (TokenType.CLASS);
}
}
- Constant parse_constant_declaration (Gee.List<Attribute>? attrs) throws ParseError {
+ Constant parse_constant_declaration (List<Attribute>? attrs) throws ParseError {
var begin = get_location ();
expect (TokenType.CONST);
return c;
}
- Field parse_field_declaration (Gee.List<Attribute>? attrs) throws ParseError {
+ Field parse_field_declaration (List<Attribute>? attrs) throws ParseError {
var begin = get_location ();
string id = parse_identifier ();
expect (TokenType.COLON);
- Method parse_main_method_declaration (Gee.List<Attribute>? attrs) throws ParseError {
+ Method parse_main_method_declaration (List<Attribute>? attrs) throws ParseError {
var id = "main";
var begin = get_location ();
DataType type = new VoidType ();
return method;
}
- Method parse_method_declaration (Gee.List<Attribute>? attrs) throws ParseError {
+ Method parse_method_declaration (List<Attribute>? attrs) throws ParseError {
var begin = get_location ();
DataType type = new VoidType ();
expect (TokenType.DEF);
return method;
}
- Property parse_property_declaration (Gee.List<Attribute>? attrs) throws ParseError {
+ Property parse_property_declaration (List<Attribute>? attrs) throws ParseError {
var begin = get_location ();
var readonly = false;
return prop;
}
- Vala.Signal parse_signal_declaration (Gee.List<Attribute>? attrs) throws ParseError {
+ Vala.Signal parse_signal_declaration (List<Attribute>? attrs) throws ParseError {
var begin = get_location ();
DataType type;
return sig;
}
- Constructor parse_constructor_declaration (Gee.List<Attribute>? attrs) throws ParseError {
+ Constructor parse_constructor_declaration (List<Attribute>? attrs) throws ParseError {
var begin = get_location ();
expect (TokenType.INIT);
return c;
}
- Destructor parse_destructor_declaration (Gee.List<Attribute>? attrs) throws ParseError {
+ Destructor parse_destructor_declaration (List<Attribute>? attrs) throws ParseError {
var begin = get_location ();
expect (TokenType.FINAL);
var d = new Destructor (get_src (begin));
return d;
}
- Symbol parse_struct_declaration (Gee.List<Attribute>? attrs) throws ParseError {
+ Symbol parse_struct_declaration (List<Attribute>? attrs) throws ParseError {
var begin = get_location ();
expect (TokenType.STRUCT);
}
}
- Symbol parse_interface_declaration (Gee.List<Attribute>? attrs) throws ParseError {
+ Symbol parse_interface_declaration (List<Attribute>? attrs) throws ParseError {
var begin = get_location ();
expect (TokenType.INTERFACE);
}
}
- Symbol parse_enum_declaration (Gee.List<Attribute>? attrs) throws ParseError {
+ Symbol parse_enum_declaration (List<Attribute>? attrs) throws ParseError {
var begin = get_location ();
expect (TokenType.ENUM);
var flags = parse_type_declaration_modifiers ();
return result;
}
- Symbol parse_errordomain_declaration (Gee.List<Attribute>? attrs) throws ParseError {
+ Symbol parse_errordomain_declaration (List<Attribute>? attrs) throws ParseError {
var begin = get_location ();
expect (TokenType.ERRORDOMAIN);
var flags = parse_type_declaration_modifiers ();
return param;
}
- CreationMethod parse_creation_method_declaration (Gee.List<Attribute>? attrs) throws ParseError {
+ CreationMethod parse_creation_method_declaration (List<Attribute>? attrs) throws ParseError {
var begin = get_location ();
CreationMethod method;
return method;
}
- Symbol parse_delegate_declaration (Gee.List<Attribute>? attrs) throws ParseError {
+ Symbol parse_delegate_declaration (List<Attribute>? attrs) throws ParseError {
var begin = get_location ();
DataType type;
return result;
}
- Gee.List<TypeParameter> parse_type_parameter_list () throws ParseError {
+ List<TypeParameter> parse_type_parameter_list () throws ParseError {
var list = new ArrayList<TypeParameter> ();
if (accept (TokenType.OF)) {
do {
}
// try to parse type argument list
- Gee.List<DataType>? parse_type_argument_list (bool maybe_expression) throws ParseError {
+ List<DataType>? parse_type_argument_list (bool maybe_expression) throws ParseError {
var begin = get_location ();
if (accept (TokenType.OF)) {
var list = new ArrayList<DataType> ();
MemberAccess expr = null;
do {
string id = parse_identifier ();
- Gee.List<DataType> type_arg_list = parse_type_argument_list (false);
+ List<DataType> type_arg_list = parse_type_argument_list (false);
expr = new MemberAccess (expr, id, get_src (begin));
if (type_arg_list != null) {
foreach (DataType type_arg in type_arg_list) {
*/
using GLib;
-using Gee;
/**
* Lexical scanner for Genie source files.
*/
using GLib;
-using Gee;
/**
* Represents an array or struct initializer list in the source code.
*/
public class Vala.InitializerList : Expression {
- private Gee.List<Expression> initializers = new ArrayList<Expression> ();
+ private List<Expression> initializers = new ArrayList<Expression> ();
/**
* Appends the specified expression to this initializer
*
* @return expression list
*/
- public Gee.List<Expression> get_initializers () {
+ public List<Expression> get_initializers () {
return new ReadOnlyList<Expression> (initializers);
}
*/
using GLib;
-using Gee;
/**
* Represents a class declaration in the source code.
*/
public class Vala.Interface : ObjectTypeSymbol {
- private Gee.List<DataType> prerequisites = new ArrayList<DataType> ();
+ private List<DataType> prerequisites = new ArrayList<DataType> ();
- private Gee.List<Method> methods = new ArrayList<Method> ();
- private Gee.List<Field> fields = new ArrayList<Field> ();
- private Gee.List<Constant> constants = new ArrayList<Constant> ();
- private Gee.List<Property> properties = new ArrayList<Property> ();
- private Gee.List<Signal> signals = new ArrayList<Signal> ();
+ private List<Method> methods = new ArrayList<Method> ();
+ private List<Field> fields = new ArrayList<Field> ();
+ private List<Constant> constants = new ArrayList<Constant> ();
+ private List<Property> properties = new ArrayList<Property> ();
+ private List<Signal> signals = new ArrayList<Signal> ();
// inner types
- private Gee.List<Class> classes = new ArrayList<Class> ();
- private Gee.List<Struct> structs = new ArrayList<Struct> ();
- private Gee.List<Enum> enums = new ArrayList<Enum> ();
- private Gee.List<Delegate> delegates = new ArrayList<Delegate> ();
+ private List<Class> classes = new ArrayList<Class> ();
+ private List<Struct> structs = new ArrayList<Struct> ();
+ private List<Enum> enums = new ArrayList<Enum> ();
+ private List<Delegate> delegates = new ArrayList<Delegate> ();
private string cname;
private string lower_case_csuffix;
*
* @return list of classes
*/
- public Gee.List<Class> get_classes () {
+ public List<Class> get_classes () {
return new ReadOnlyList<Class> (classes);
}
*
* @return list of structs
*/
- public Gee.List<Struct> get_structs () {
+ public List<Struct> get_structs () {
return new ReadOnlyList<Struct> (structs);
}
*
* @return list of enums
*/
- public Gee.List<Enum> get_enums () {
+ public List<Enum> get_enums () {
return new ReadOnlyList<Enum> (enums);
}
*
* @return list of delegates
*/
- public Gee.List<Delegate> get_delegates () {
+ public List<Delegate> get_delegates () {
return new ReadOnlyList<Delegate> (delegates);
}
*
* @return list of base types
*/
- public Gee.List<DataType> get_prerequisites () {
+ public List<DataType> get_prerequisites () {
return new ReadOnlyList<DataType> (prerequisites);
}
*
* @return list of methods
*/
- public override Gee.List<Method> get_methods () {
+ public override List<Method> get_methods () {
return new ReadOnlyList<Method> (methods);
}
*
* @return list of fields
*/
- public Gee.List<Field> get_fields () {
+ public List<Field> get_fields () {
return new ReadOnlyList<Field> (fields);
}
*
* @return list of constants
*/
- public Gee.List<Constant> get_constants () {
+ public List<Constant> get_constants () {
return new ReadOnlyList<Constant> (constants);
}
*
* @return list of properties
*/
- public override Gee.List<Property> get_properties () {
+ public override List<Property> get_properties () {
return new ReadOnlyList<Property> (properties);
}
*
* @return list of signals
*/
- public override Gee.List<Signal> get_signals () {
+ public override List<Signal> get_signals () {
return new ReadOnlyList<Signal> (signals);
}
*/
using GLib;
-using Gee;
/**
* Represents a lambda expression in the source code. Lambda expressions are
*/
public Method method { get; set; }
- private Gee.List<string> parameters = new ArrayList<string> ();
+ private List<string> parameters = new ArrayList<string> ();
/**
* Creates a new lambda expression.
*
* @return parameter list
*/
- public Gee.List<string> get_parameters () {
+ public List<string> get_parameters () {
return new ReadOnlyList<string> (parameters);
}
*/
using GLib;
-using Gee;
/**
* Represents a general class member.
public abstract class Vala.Member : Symbol {
public Comment comment { get; set; }
- private Gee.List<string> cheader_filenames = new ArrayList<string> ();
+ private List<string> cheader_filenames = new ArrayList<string> ();
/**
* Specifies whether this method explicitly hides a member of a base
visitor.visit_member (this);
}
- public override Gee.List<string> get_cheader_filenames () {
+ public override List<string> get_cheader_filenames () {
if (cheader_filenames.size == 0 && parent_symbol != null) {
/* default to header filenames of the namespace */
foreach (string filename in parent_symbol.get_cheader_filenames ()) {
*/
using GLib;
-using Gee;
/**
* Represents an access to a type member in the source code.
public bool qualified { get; set; }
private Expression? _inner;
- private Gee.List<DataType> type_argument_list = new ArrayList<DataType> ();
+ private List<DataType> type_argument_list = new ArrayList<DataType> ();
/**
* Creates a new member access expression.
*
* @return type argument list
*/
- public Gee.List<DataType> get_type_arguments () {
+ public List<DataType> get_type_arguments () {
return new ReadOnlyList<DataType> (type_argument_list);
}
*/
using GLib;
-using Gee;
/**
* Represents a type or namespace method.
*/
public class Vala.Method : Member {
- Gee.List<TypeParameter> type_parameters = new ArrayList<TypeParameter> ();
+ List<TypeParameter> type_parameters = new ArrayList<TypeParameter> ();
public const string DEFAULT_SENTINEL = "NULL";
public bool is_async_callback { get; set; }
- private Gee.List<FormalParameter> parameters = new ArrayList<FormalParameter> ();
+ private List<FormalParameter> parameters = new ArrayList<FormalParameter> ();
private string cname;
private string _vfunc_name;
private string _sentinel;
- private Gee.List<Expression> preconditions = new ArrayList<Expression> ();
- private Gee.List<Expression> postconditions = new ArrayList<Expression> ();
+ private List<Expression> preconditions = new ArrayList<Expression> ();
+ private List<Expression> postconditions = new ArrayList<Expression> ();
private DataType _return_type;
private Block _body;
Method? callback_method;
// only valid for closures
- Gee.List<LocalVariable> captured_variables;
+ List<LocalVariable> captured_variables;
/**
* Creates a new method.
}
}
- public Gee.List<FormalParameter> get_parameters () {
+ public List<FormalParameter> get_parameters () {
return new ReadOnlyList<FormalParameter> (parameters);
}
*
* @return list of type parameters
*/
- public Gee.List<TypeParameter> get_type_parameters () {
+ public List<TypeParameter> get_type_parameters () {
return new ReadOnlyList<TypeParameter> (type_parameters);
}
*
* @return list of preconditions
*/
- public Gee.List<Expression> get_preconditions () {
+ public List<Expression> get_preconditions () {
return new ReadOnlyList<Expression> (preconditions);
}
*
* @return list of postconditions
*/
- public Gee.List<Expression> get_postconditions () {
+ public List<Expression> get_postconditions () {
return new ReadOnlyList<Expression> (postconditions);
}
return callback_method;
}
- public Gee.List<FormalParameter> get_async_begin_parameters () {
+ public List<FormalParameter> get_async_begin_parameters () {
assert (this.coroutine);
var glib_ns = CodeContext.get ().root.scope.lookup ("GLib");
return params;
}
- public Gee.List<FormalParameter> get_async_end_parameters () {
+ public List<FormalParameter> get_async_end_parameters () {
assert (this.coroutine);
var params = new ArrayList<FormalParameter> ();
*/
using GLib;
-using Gee;
/**
* Represents an invocation expression in the source code.
public Expression _call;
- private Gee.List<Expression> argument_list = new ArrayList<Expression> ();
+ private List<Expression> argument_list = new ArrayList<Expression> ();
/**
* Creates a new invocation expression.
*
* @return argument list
*/
- public Gee.List<Expression> get_argument_list () {
+ public List<Expression> get_argument_list () {
return new ReadOnlyList<Expression> (argument_list);
}
*/
using GLib;
-using Gee;
/**
* The type of a method referencea.
return method_symbol.return_type;
}
- public override Gee.List<FormalParameter>? get_parameters () {
+ public override List<FormalParameter>? get_parameters () {
return method_symbol.get_parameters ();
}
*/
using GLib;
-using Gee;
/**
* Represents a namespace declaration in the source code.
*/
public class Vala.Namespace : Symbol {
- private Gee.List<Class> classes = new ArrayList<Class> ();
- private Gee.List<Interface> interfaces = new ArrayList<Interface> ();
- private Gee.List<Struct> structs = new ArrayList<Struct> ();
- private Gee.List<Enum> enums = new ArrayList<Enum> ();
- private Gee.List<ErrorDomain> error_domains = new ArrayList<ErrorDomain> ();
- private Gee.List<Delegate> delegates = new ArrayList<Delegate> ();
- private Gee.List<Constant> constants = new ArrayList<Constant> ();
- private Gee.List<Field> fields = new ArrayList<Field> ();
- private Gee.List<Method> methods = new ArrayList<Method> ();
-
- private Gee.List<Comment> comments = new ArrayList<Comment> ();
-
- private Gee.List<string> cprefixes = new ArrayList<string> ();
+ private List<Class> classes = new ArrayList<Class> ();
+ private List<Interface> interfaces = new ArrayList<Interface> ();
+ private List<Struct> structs = new ArrayList<Struct> ();
+ private List<Enum> enums = new ArrayList<Enum> ();
+ private List<ErrorDomain> error_domains = new ArrayList<ErrorDomain> ();
+ private List<Delegate> delegates = new ArrayList<Delegate> ();
+ private List<Constant> constants = new ArrayList<Constant> ();
+ private List<Field> fields = new ArrayList<Field> ();
+ private List<Method> methods = new ArrayList<Method> ();
+
+ private List<Comment> comments = new ArrayList<Comment> ();
+
+ private List<string> cprefixes = new ArrayList<string> ();
private string lower_case_cprefix;
- private Gee.List<string> cheader_filenames = new ArrayList<string> ();
+ private List<string> cheader_filenames = new ArrayList<string> ();
- private Gee.List<Namespace> namespaces = new ArrayList<Namespace> ();
+ private List<Namespace> namespaces = new ArrayList<Namespace> ();
- private Gee.List<UsingDirective> using_directives = new ArrayList<UsingDirective> ();
+ private List<UsingDirective> using_directives = new ArrayList<UsingDirective> ();
/**
* Creates a new namespace.
*
* @return comment list
*/
- public Gee.List<Comment> get_comments () {
+ public List<Comment> get_comments () {
return new ReadOnlyList<Comment> (comments);
}
*
* @return namespace list
*/
- public Gee.List<Namespace> get_namespaces () {
+ public List<Namespace> get_namespaces () {
return new ReadOnlyList<Namespace> (namespaces);
}
*
* @return struct list
*/
- public Gee.List<Struct> get_structs () {
+ public List<Struct> get_structs () {
return new ReadOnlyList<Struct> (structs);
}
*
* @return class list
*/
- public Gee.List<Class> get_classes () {
+ public List<Class> get_classes () {
return new ReadOnlyList<Class> (classes);
}
*
* @return interface list
*/
- public Gee.List<Interface> get_interfaces () {
+ public List<Interface> get_interfaces () {
return new ReadOnlyList<Interface> (interfaces);
}
*
* @return enum list
*/
- public Gee.List<Enum> get_enums () {
+ public List<Enum> get_enums () {
return new ReadOnlyList<Enum> (enums);
}
*
* @return error domain list
*/
- public Gee.List<ErrorDomain> get_error_domains () {
+ public List<ErrorDomain> get_error_domains () {
return new ReadOnlyList<ErrorDomain> (error_domains);
}
*
* @return field list
*/
- public Gee.List<Field> get_fields () {
+ public List<Field> get_fields () {
return new ReadOnlyList<Field> (fields);
}
*
* @return constant list
*/
- public Gee.List<Constant> get_constants () {
+ public List<Constant> get_constants () {
return new ReadOnlyList<Constant> (constants);
}
*
* @return delegate list
*/
- public Gee.List<Delegate> get_delegates () {
+ public List<Delegate> get_delegates () {
return new ReadOnlyList<Delegate> (delegates);
}
*
* @return method list
*/
- public Gee.List<Method> get_methods () {
+ public List<Method> get_methods () {
return new ReadOnlyList<Method> (methods);
}
}
}
- public Gee.List<string> get_cprefixes () {
+ public List<string> get_cprefixes () {
if (0 == cprefixes.size && null != name)
cprefixes.add (name);
this.lower_case_cprefix = cprefix;
}
- public override Gee.List<string> get_cheader_filenames () {
+ public override List<string> get_cheader_filenames () {
return new ReadOnlyList<string> (cheader_filenames);
}
*/
using GLib;
-using Gee;
/**
* Represents an object creation expression in the source code.
public bool struct_creation { get; set; }
- private Gee.List<Expression> argument_list = new ArrayList<Expression> ();
+ private List<Expression> argument_list = new ArrayList<Expression> ();
- private Gee.List<MemberInitializer> object_initializer = new ArrayList<MemberInitializer> ();
+ private List<MemberInitializer> object_initializer = new ArrayList<MemberInitializer> ();
private DataType _data_type;
*
* @return argument list
*/
- public Gee.List<Expression> get_argument_list () {
+ public List<Expression> get_argument_list () {
return new ReadOnlyList<Expression> (argument_list);
}
*
* @return member initializer list
*/
- public Gee.List<MemberInitializer> get_object_initializer () {
+ public List<MemberInitializer> get_object_initializer () {
return new ReadOnlyList<MemberInitializer> (object_initializer);
}
}
}
- public override Gee.List<FormalParameter>? get_parameters () {
+ public override List<FormalParameter>? get_parameters () {
var cl = type_symbol as Class;
if (cl != null && cl.default_construction_method != null) {
return cl.default_construction_method.get_parameters ();
* Philip Van Hoof <pvanhoof@gnome.org>
*/
-using Gee;
/**
* Represents a runtime data type for objects and interfaces. This data type may
* Vala API file.
*/
public abstract class Vala.ObjectTypeSymbol : TypeSymbol {
- private Gee.List<TypeParameter> type_parameters = new ArrayList<TypeParameter> ();
+ private List<TypeParameter> type_parameters = new ArrayList<TypeParameter> ();
public ObjectTypeSymbol (string name, SourceReference? source_reference = null, Comment? comment = null) {
base (name, source_reference, comment);
}
- public abstract Gee.List<Method> get_methods ();
- public abstract Gee.List<Signal> get_signals ();
- public abstract Gee.List<Property> get_properties ();
+ public abstract List<Method> get_methods ();
+ public abstract List<Signal> get_signals ();
+ public abstract List<Property> get_properties ();
/**
* Appends the specified parameter to the list of type parameters.
*
* @return list of type parameters
*/
- public Gee.List<TypeParameter> get_type_parameters () {
+ public List<TypeParameter> get_type_parameters () {
return new ReadOnlyList<TypeParameter> (type_parameters);
}
*/
using GLib;
-using Gee;
/**
* Code visitor parsing all Vala source files.
}
var sym = parse_symbol_name ();
- Gee.List<DataType> type_arg_list = parse_type_argument_list (false);
+ List<DataType> type_arg_list = parse_type_argument_list (false);
DataType type = new UnresolvedType.from_symbol (sym, get_src (begin));
if (type_arg_list != null) {
return type;
}
- Gee.List<Expression> parse_argument_list () throws ParseError {
+ List<Expression> parse_argument_list () throws ParseError {
var list = new ArrayList<Expression> ();
if (current () != TokenType.CLOSE_PARENS) {
do {
id = parse_identifier ();
qualified = true;
}
- Gee.List<DataType> type_arg_list = parse_type_argument_list (true);
+ List<DataType> type_arg_list = parse_type_argument_list (true);
var expr = new MemberAccess (null, id, get_src (begin));
expr.qualified = qualified;
if (type_arg_list != null) {
Expression parse_member_access (SourceLocation begin, Expression inner) throws ParseError {
expect (TokenType.DOT);
string id = parse_identifier ();
- Gee.List<DataType> type_arg_list = parse_type_argument_list (true);
+ List<DataType> type_arg_list = parse_type_argument_list (true);
var expr = new MemberAccess (inner, id, get_src (begin));
if (type_arg_list != null) {
foreach (DataType type_arg in type_arg_list) {
Expression parse_pointer_member_access (SourceLocation begin, Expression inner) throws ParseError {
expect (TokenType.OP_PTR);
string id = parse_identifier ();
- Gee.List<DataType> type_arg_list = parse_type_argument_list (true);
+ List<DataType> type_arg_list = parse_type_argument_list (true);
var expr = new MemberAccess.pointer (inner, id, get_src (begin));
if (type_arg_list != null) {
foreach (DataType type_arg in type_arg_list) {
return expr;
}
- Gee.List<Expression> parse_expression_list () throws ParseError {
+ List<Expression> parse_expression_list () throws ParseError {
var list = new ArrayList<Expression> ();
do {
list.add (parse_expression ());
Expression parse_array_creation_expression (SourceLocation begin, MemberAccess member) throws ParseError {
bool size_specified = false;
- Gee.List<Expression> size_specifier_list = null;
+ List<Expression> size_specifier_list = null;
bool first = true;
DataType element_type = UnresolvedType.new_from_expression (member);
do {
return expr;
}
- Gee.List<MemberInitializer> parse_object_initializer () throws ParseError {
+ List<MemberInitializer> parse_object_initializer () throws ParseError {
var list = new ArrayList<MemberInitializer> ();
if (accept (TokenType.OPEN_BRACE)) {
do {
Expression parse_lambda_expression () throws ParseError {
var begin = get_location ();
- Gee.List<string> params = new ArrayList<string> ();
+ List<string> params = new ArrayList<string> ();
if (accept (TokenType.OPEN_PARENS)) {
if (current () != TokenType.CLOSE_PARENS) {
do {
return stmt;
}
- void parse_catch_clauses (Gee.List<CatchClause> catch_clauses) throws ParseError {
+ void parse_catch_clauses (List<CatchClause> catch_clauses) throws ParseError {
while (accept (TokenType.CATCH)) {
var begin = get_location ();
DataType type = null;
return new DeleteStatement (expr, get_src (begin));
}
- Gee.List<Attribute>? parse_attributes () throws ParseError {
+ List<Attribute>? parse_attributes () throws ParseError {
if (current () != TokenType.OPEN_BRACKET) {
return null;
}
return attrs;
}
- void set_attributes (CodeNode node, Gee.List<Attribute>? attributes) {
+ void set_attributes (CodeNode node, List<Attribute>? attributes) {
if (attributes != null) {
- foreach (Attribute attr in (Gee.List<Attribute>) attributes) {
+ foreach (Attribute attr in (List<Attribute>) attributes) {
node.attributes.append (attr);
}
}
return RecoveryState.EOF;
}
- Namespace parse_namespace_declaration (Gee.List<Attribute>? attrs) throws ParseError {
+ Namespace parse_namespace_declaration (List<Attribute>? attrs) throws ParseError {
var begin = get_location ();
expect (TokenType.NAMESPACE);
var sym = parse_symbol_name ();
}
}
- Symbol parse_class_declaration (Gee.List<Attribute>? attrs) throws ParseError {
+ Symbol parse_class_declaration (List<Attribute>? attrs) throws ParseError {
var begin = get_location ();
var access = parse_access_modifier ();
var flags = parse_type_declaration_modifiers ();
}
}
- Constant parse_constant_declaration (Gee.List<Attribute>? attrs) throws ParseError {
+ Constant parse_constant_declaration (List<Attribute>? attrs) throws ParseError {
var begin = get_location ();
var access = parse_access_modifier ();
var flags = parse_member_declaration_modifiers ();
return c;
}
- Field parse_field_declaration (Gee.List<Attribute>? attrs) throws ParseError {
+ Field parse_field_declaration (List<Attribute>? attrs) throws ParseError {
var begin = get_location ();
var access = parse_access_modifier ();
var flags = parse_member_declaration_modifiers ();
return initializer;
}
- Method parse_method_declaration (Gee.List<Attribute>? attrs) throws ParseError {
+ Method parse_method_declaration (List<Attribute>? attrs) throws ParseError {
var begin = get_location ();
var access = parse_access_modifier ();
var flags = parse_member_declaration_modifiers ();
return method;
}
- Property parse_property_declaration (Gee.List<Attribute>? attrs) throws ParseError {
+ Property parse_property_declaration (List<Attribute>? attrs) throws ParseError {
var begin = get_location ();
var access = parse_access_modifier ();
var flags = parse_member_declaration_modifiers ();
return prop;
}
- Signal parse_signal_declaration (Gee.List<Attribute>? attrs) throws ParseError {
+ Signal parse_signal_declaration (List<Attribute>? attrs) throws ParseError {
var begin = get_location ();
var access = parse_access_modifier ();
var flags = parse_member_declaration_modifiers ();
return sig;
}
- Constructor parse_constructor_declaration (Gee.List<Attribute>? attrs) throws ParseError {
+ Constructor parse_constructor_declaration (List<Attribute>? attrs) throws ParseError {
var begin = get_location ();
var flags = parse_member_declaration_modifiers ();
expect (TokenType.CONSTRUCT);
return c;
}
- Destructor parse_destructor_declaration (Gee.List<Attribute>? attrs) throws ParseError {
+ Destructor parse_destructor_declaration (List<Attribute>? attrs) throws ParseError {
var begin = get_location ();
var flags = parse_member_declaration_modifiers ();
expect (TokenType.TILDE);
return d;
}
- Symbol parse_struct_declaration (Gee.List<Attribute>? attrs) throws ParseError {
+ Symbol parse_struct_declaration (List<Attribute>? attrs) throws ParseError {
var begin = get_location ();
var access = parse_access_modifier ();
var flags = parse_type_declaration_modifiers ();
}
}
- Symbol parse_interface_declaration (Gee.List<Attribute>? attrs) throws ParseError {
+ Symbol parse_interface_declaration (List<Attribute>? attrs) throws ParseError {
var begin = get_location ();
var access = parse_access_modifier ();
var flags = parse_type_declaration_modifiers ();
}
}
- Symbol parse_enum_declaration (Gee.List<Attribute>? attrs) throws ParseError {
+ Symbol parse_enum_declaration (List<Attribute>? attrs) throws ParseError {
var begin = get_location ();
var access = parse_access_modifier ();
var flags = parse_type_declaration_modifiers ();
return result;
}
- Symbol parse_errordomain_declaration (Gee.List<Attribute>? attrs) throws ParseError {
+ Symbol parse_errordomain_declaration (List<Attribute>? attrs) throws ParseError {
var begin = get_location ();
var access = parse_access_modifier ();
var flags = parse_type_declaration_modifiers ();
return param;
}
- CreationMethod parse_creation_method_declaration (Gee.List<Attribute>? attrs) throws ParseError {
+ CreationMethod parse_creation_method_declaration (List<Attribute>? attrs) throws ParseError {
var begin = get_location ();
var access = parse_access_modifier ();
var flags = parse_member_declaration_modifiers ();
return method;
}
- Symbol parse_delegate_declaration (Gee.List<Attribute>? attrs) throws ParseError {
+ Symbol parse_delegate_declaration (List<Attribute>? attrs) throws ParseError {
var begin = get_location ();
var access = parse_access_modifier ();
var flags = parse_member_declaration_modifiers ();
return result;
}
- Gee.List<TypeParameter> parse_type_parameter_list () throws ParseError {
+ List<TypeParameter> parse_type_parameter_list () throws ParseError {
var list = new ArrayList<TypeParameter> ();
if (accept (TokenType.OP_LT)) {
do {
}
// try to parse type argument list
- Gee.List<DataType>? parse_type_argument_list (bool maybe_expression) throws ParseError {
+ List<DataType>? parse_type_argument_list (bool maybe_expression) throws ParseError {
var begin = get_location ();
if (accept (TokenType.OP_LT)) {
var list = new ArrayList<DataType> ();
qualified = true;
}
- Gee.List<DataType> type_arg_list = parse_type_argument_list (false);
+ List<DataType> type_arg_list = parse_type_argument_list (false);
expr = new MemberAccess (expr, id, get_src (begin));
expr.qualified = qualified;
if (type_arg_list != null) {
* Jürg Billeter <j@bitron.ch>
*/
-using Gee;
public class Vala.PhiFunction {
public LocalVariable original_variable { get; private set; }
- public Gee.List<LocalVariable?> operands { get; private set; }
+ public List<LocalVariable?> operands { get; private set; }
public PhiFunction (LocalVariable variable, int num_of_ops) {
this.original_variable = variable;
* Jürg Billeter <j@bitron.ch>
*/
-using Gee;
/**
* Represents a pointer indirection in the source code, e.g. `*pointer'.
*/
using GLib;
-using Gee;
/**
* A pointer type.
return SemanticAnalyzer.symbol_lookup_inherited (base_symbol, member_name);
}
- public override Gee.List<Symbol> get_symbols () {
+ public override List<Symbol> get_symbols () {
return base_type.get_symbols ();
}
}
}
- public override Gee.List<string> get_cheader_filenames () {
+ public override List<string> get_cheader_filenames () {
return parent_symbol.get_cheader_filenames ();
}
}
* Jürg Billeter <j@bitron.ch>
*/
-using Gee;
/**
* Represents a reference transfer expression in the source code, e.g. `#foo'.
* Jürg Billeter <j@bitron.ch>
*/
-using Gee;
/**
* Represents a return statement in the source code.
*/
using GLib;
-using Gee;
/**
* Lexical scanner for Vala source files.
*/
using GLib;
-using Gee;
/**
* Represents a part of the symbol tree.
public weak Scope parent_scope { get; set; }
private Map<string,Symbol> symbol_table;
- private Gee.List<Symbol> anonymous_members;
+ private List<Symbol> anonymous_members;
/**
* Creates a new scope.
*/
using GLib;
-using Gee;
/**
* Code visitor analyzing and checking code.
// keep replaced alive to make sure they remain valid
// for the whole execution of CodeNode.accept
- public Gee.List<CodeNode> replaced_nodes = new ArrayList<CodeNode> ();
+ public List<CodeNode> replaced_nodes = new ArrayList<CodeNode> ();
public SemanticAnalyzer () {
}
return type;
}
- public bool check_arguments (Expression expr, DataType mtype, Gee.List<FormalParameter> params, Gee.List<Expression> args) {
+ public bool check_arguments (Expression expr, DataType mtype, List<FormalParameter> params, List<Expression> args) {
Expression prev_arg = null;
Iterator<Expression> arg_it = args.iterator ();
*/
using GLib;
-using Gee;
/**
* Represents an object signal. Signals enable objects to provide notifications.
*/
public bool is_virtual { get; set; }
- private Gee.List<FormalParameter> parameters = new ArrayList<FormalParameter> ();
+ private List<FormalParameter> parameters = new ArrayList<FormalParameter> ();
/**
* Refers to the default signal handler, which is an anonymous
* function in the scope.
scope.add (param.name, param);
}
- public Gee.List<FormalParameter> get_parameters () {
+ public List<FormalParameter> get_parameters () {
return new ReadOnlyList<FormalParameter> (parameters);
}
*/
using GLib;
-using Gee;
/**
* The type of a signal referencea.
return signal_symbol.return_type;
}
- public override Gee.List<FormalParameter>? get_parameters () {
+ public override List<FormalParameter>? get_parameters () {
return signal_symbol.get_parameters ();
}
return null;
}
- public override Gee.List<Symbol> get_symbols () {
+ public override List<Symbol> get_symbols () {
var symbols = new ArrayList<Symbol> ();
symbols.add (signal_symbol);
return symbols;
*/
using GLib;
-using Gee;
/**
* Represents a Vala source or VAPI package file.
private ArrayList<Comment> comments = new ArrayList<Comment> ();
- public Gee.List<UsingDirective> current_using_directives { get; set; default = new ArrayList<UsingDirective> (); }
+ public List<UsingDirective> current_using_directives { get; set; default = new ArrayList<UsingDirective> (); }
- private Gee.List<CodeNode> nodes = new ArrayList<CodeNode> ();
+ private List<CodeNode> nodes = new ArrayList<CodeNode> ();
private string csource_filename = null;
private string cinclude_filename = null;
- private Gee.ArrayList<string> source_array = null;
+ private ArrayList<string> source_array = null;
private MappedFile mapped_file = null;
*
* @return list of comments
*/
- public Gee.List<Comment> get_comments () {
+ public List<Comment> get_comments () {
return new ReadOnlyList<Comment> (comments);
}
*
* @return code node list
*/
- public Gee.List<CodeNode> get_nodes () {
+ public List<CodeNode> get_nodes () {
return new ReadOnlyList<CodeNode> (nodes);
}
private void read_source_lines (string cont)
{
- source_array = new Gee.ArrayList<string> ();
+ source_array = new ArrayList<string> ();
string[] lines = cont.split ("\n", 0);
int idx;
for (idx = 0; lines[idx] != null; ++idx) {
*/
public int last_column { get; set; }
- public Gee.List<UsingDirective> using_directives { get; private set; }
+ public List<UsingDirective> using_directives { get; private set; }
/**
* Creates a new source reference.
* Jürg Billeter <j@bitron.ch>
*/
-using Gee;
public class Vala.StatementList : CodeNode, Statement {
- private Gee.List<Statement> list = new ArrayList<Statement> ();
+ private List<Statement> list = new ArrayList<Statement> ();
public int length {
get { return list.size; }
*/
using GLib;
-using Gee;
/**
* Represents a struct declaration in the source code.
*/
public class Vala.Struct : TypeSymbol {
- private Gee.List<TypeParameter> type_parameters = new ArrayList<TypeParameter> ();
- private Gee.List<Constant> constants = new ArrayList<Constant> ();
- private Gee.List<Field> fields = new ArrayList<Field> ();
- private Gee.List<Method> methods = new ArrayList<Method> ();
- private Gee.List<Property> properties = new ArrayList<Property> ();
+ private List<TypeParameter> type_parameters = new ArrayList<TypeParameter> ();
+ private List<Constant> constants = new ArrayList<Constant> ();
+ private List<Field> fields = new ArrayList<Field> ();
+ private List<Method> methods = new ArrayList<Method> ();
+ private List<Property> properties = new ArrayList<Property> ();
private DataType _base_type = null;
private string cname;
*
* @return list of type parameters
*/
- public Gee.List<TypeParameter> get_type_parameters () {
+ public List<TypeParameter> get_type_parameters () {
return new ReadOnlyList<TypeParameter> (type_parameters);
}
*
* @return list of fields
*/
- public Gee.List<Field> get_fields () {
+ public List<Field> get_fields () {
return new ReadOnlyList<Field> (fields);
}
*
* @return list of constants
*/
- public Gee.List<Constant> get_constants () {
+ public List<Constant> get_constants () {
return new ReadOnlyList<Constant> (constants);
}
*
* @return list of methods
*/
- public Gee.List<Method> get_methods () {
+ public List<Method> get_methods () {
return new ReadOnlyList<Method> (methods);
}
*
* @return list of properties
*/
- public Gee.List<Property> get_properties () {
+ public List<Property> get_properties () {
return new ReadOnlyList<Property> (properties);
}
*/
using GLib;
-using Gee;
/**
* Represents a switch section in the source code.
*/
public class Vala.SwitchSection : Block {
- private Gee.List<SwitchLabel> labels = new ArrayList<SwitchLabel> ();
+ private List<SwitchLabel> labels = new ArrayList<SwitchLabel> ();
/**
* Creates a new switch section.
*
* @return switch label list
*/
- public Gee.List<SwitchLabel> get_labels () {
+ public List<SwitchLabel> get_labels () {
return new ReadOnlyList<SwitchLabel> (labels);
}
*/
using GLib;
-using Gee;
/**
* Represents a switch selection statement in the source code.
}
private Expression _expression;
- private Gee.List<SwitchSection> sections = new ArrayList<SwitchSection> ();
+ private List<SwitchSection> sections = new ArrayList<SwitchSection> ();
/**
* Creates a new switch statement.
*
* @return section list
*/
- public Gee.List<SwitchSection> get_sections () {
+ public List<SwitchSection> get_sections () {
return new ReadOnlyList<SwitchSection> (sections);
}
*/
using GLib;
-using Gee;
/**
* Represents a node in the symbol tree.
*
* @return list of C header filenames for this symbol
*/
- public virtual Gee.List<string> get_cheader_filenames () {
+ public virtual List<string> get_cheader_filenames () {
return new ArrayList<string> ();
}
*/
using GLib;
-using Gee;
/**
* Code visitor resolving symbol names.
* Jürg Billeter <j@bitron.ch>
*/
-using Gee;
public class Vala.Template : Expression {
- private Gee.List<Expression> expression_list = new ArrayList<Expression> ();
+ private List<Expression> expression_list = new ArrayList<Expression> ();
public Template () {
}
expression_list.add (expr);
}
- public Gee.List<Expression> get_expressions () {
+ public List<Expression> get_expressions () {
return expression_list;
}
* Jürg Billeter <j@bitron.ch>
*/
-using Gee;
/**
* Represents a throw statement in the source code.
*/
using GLib;
-using Gee;
/**
* Represents a try statement in the source code.
private Block _body;
private Block _finally_body;
- private Gee.List<CatchClause> catch_clauses = new ArrayList<CatchClause> ();
+ private List<CatchClause> catch_clauses = new ArrayList<CatchClause> ();
/**
* Creates a new try statement.
*
* @return list of catch clauses
*/
- public Gee.List<CatchClause> get_catch_clauses () {
+ public List<CatchClause> get_catch_clauses () {
return new ReadOnlyList<CatchClause> (catch_clauses);
}
body.check (analyzer);
- var error_types = new Gee.ArrayList<DataType> ();
+ var error_types = new ArrayList<DataType> ();
foreach (DataType body_error_type in body.get_error_types ()) {
error_types.add (body_error_type);
}
- var handled_error_types = new Gee.ArrayList<DataType> ();
+ var handled_error_types = new ArrayList<DataType> ();
foreach (CatchClause clause in catch_clauses) {
foreach (DataType body_error_type in error_types) {
if (clause.error_type == null || body_error_type.compatible (clause.error_type)) {
*/
using GLib;
-using Gee;
/**
* Represents a fixed-length sequence of expressions in the source code.
*/
public class Vala.Tuple : Expression {
- private Gee.List<Expression> expression_list = new ArrayList<Expression> ();
+ private List<Expression> expression_list = new ArrayList<Expression> ();
public Tuple () {
}
expression_list.add (expr);
}
- public Gee.List<Expression> get_expressions () {
+ public List<Expression> get_expressions () {
return expression_list;
}
*/
using GLib;
-using Gee;
/**
* Represents a generic type parameter in the source code.
*/
using GLib;
-using Gee;
/**
* Represents a runtime data type. This data type may be defined in Vala source
public abstract class Vala.TypeSymbol : Symbol {
public Comment? comment { get; set; }
- private Gee.List<string> cheader_filenames = new ArrayList<string> ();
+ private List<string> cheader_filenames = new ArrayList<string> ();
public TypeSymbol (string? name, SourceReference? source_reference = null, Comment? comment = null) {
base (name, source_reference);
return null;
}
- public override Gee.List<string> get_cheader_filenames () {
+ public override List<string> get_cheader_filenames () {
// parent_symbol can be null on incremental parsing
if (cheader_filenames.size == 0 && parent_symbol != null) {
/* default to header filenames of the namespace */
* Jürg Billeter <j@bitron.ch>
*/
-using Gee;
/**
* Represents an expression with one operand in the source code.
*/
using GLib;
-using Gee;
/**
* An unresolved reference to a data type.
*/
using GLib;
-using Gee;
/**
* Code visitor parsing all GIDL files.
private TypeSymbol current_data_type;
private Map<string,string> codenode_attributes_map;
private Map<PatternSpec*,string> codenode_attributes_patterns;
- private Gee.Set<string> current_type_symbol_set;
+ private Set<string> current_type_symbol_set;
private Map<string,TypeSymbol> cname_type_map;
*/
using GLib;
-using Gee;
/**
* Code visitor parsing all Vala source files.
*/
using GLib;
-using Gee;
/**
* Simple reader for a subset of XML.
public SourceFile gidl { get; construct; }
public SourceFile metadata { get; construct; }
- private Gee.List<string> _scope;
- private Gee.Set<string> _symbols;
+ private List<string> _scope;
+ private Set<string> _symbols;
private void parse_gidl () {
- _scope = new Gee.ArrayList<string> ();
- _symbols = new Gee.HashSet<string> (str_hash, str_equal);
+ _scope = new ArrayList<string> ();
+ _symbols = new HashSet<string> (str_hash, str_equal);
try {
foreach (weak IdlModule module in Idl.parse_file (gidl.filename)) {
_scope.remove_at (_scope.size - 1);
}
- private void parse_members (string name, List<IdlNode> members) {
+ private void parse_members (string name, GLib.List<IdlNode> members) {
enter_scope (name);
foreach (weak IdlNode node in members) {
case IdlNodeTypeId.FUNCTION:
parse_members (((IdlNodeFunction) node).symbol,
- (List<IdlNode>) ((IdlNodeFunction) node).parameters);
+ (GLib.List<IdlNode>) ((IdlNodeFunction) node).parameters);
break;
case IdlNodeTypeId.BOXED: