2007-03-03 Jürg Billeter <j@bitron.ch>
+ * Switch to new construction syntax
+
+2007-03-03 Jürg Billeter <j@bitron.ch>
+
* vala/parser.y: support new construction syntax
* vala/valainterfacewriter.vala: write interface with new construction
syntax
*/
public CCodeExpression right { get; construct; }
- public construct (CCodeExpression l, CCodeExpression r, CCodeAssignmentOperator op = CCodeAssignmentOperator.SIMPLE) {
+ public CCodeAssignment (CCodeExpression l, CCodeExpression r, CCodeAssignmentOperator op = CCodeAssignmentOperator.SIMPLE) {
left = l;
operator = op;
right = r;
*/
public CCodeExpression! right { get; set construct; }
- public construct (CCodeBinaryOperator op, CCodeExpression! l, CCodeExpression! r) {
+ public CCodeBinaryExpression (CCodeBinaryOperator op, CCodeExpression! l, CCodeExpression! r) {
operator = op;
left = l;
right = r;
private List<CCodeStatement> statements;
- public construct (CCodeExpression! expr) {
+ public CCodeCaseStatement (CCodeExpression! expr) {
expression = expr;
}
*/
public string! type_name { get; set construct; }
- public construct (CCodeExpression! expr, string! type) {
+ public CCodeCastExpression (CCodeExpression! expr, string! type) {
inner = expr;
type_name = type;
}
*/
public string! text { get; set construct; }
- public construct (string! _text) {
+ public CCodeComment (string! _text) {
text = _text;
}
*/
public CCodeExpression! false_expression { get; set construct; }
- public construct (CCodeExpression! cond, CCodeExpression! true_expr, CCodeExpression! false_expr) {
+ public CCodeConditionalExpression (CCodeExpression! cond, CCodeExpression! true_expr, CCodeExpression! false_expr) {
condition = cond;
true_expression = true_expr;
false_expression = false_expr;
*/
public string! name { get; set construct; }
- public construct (string! _name) {
+ public CCodeConstant (string! _name) {
name = _name;
}
private List<CCodeDeclarator> declarators;
- public construct (string! _type_name) {
+ public CCodeDeclaration (string! _type_name) {
type_name = _type_name;
}
*/
public CCodeExpression! condition { get; set construct; }
- public construct (CCodeStatement stmt, CCodeExpression! cond) {
+ public CCodeDoStatement (CCodeStatement stmt, CCodeExpression! cond) {
body = stmt;
condition = cond;
}
*/
public CCodeExpression! index { get; set construct; }
- public construct (CCodeExpression! cont, CCodeExpression! i) {
+ public CCodeElementAccess (CCodeExpression! cont, CCodeExpression! i) {
container = cont;
index = i;
}
private List<string> values;
- public construct (string n = null) {
+ public CCodeEnum (string n = null) {
name = n;
}
*/
public CCodeExpression! expression { get; set construct; }
- public construct (CCodeExpression expr) {
+ public CCodeExpressionStatement (CCodeExpression expr) {
expression = expr;
}
*/
public string! type_name { get; set construct; }
- public construct (string! n, string! type) {
+ public CCodeFormalParameter (string! n, string! type) {
name = n;
type_name = type;
}
private List<CCodeExpression> initializer;
private List<CCodeExpression> iterator;
- public construct (CCodeExpression! cond, CCodeStatement stmt = null) {
+ public CCodeForStatement (CCodeExpression! cond, CCodeStatement stmt = null) {
condition = cond;
body = stmt;
}
private List<CCodeFormalParameter> parameters;
- public construct (string! _name, string! _return_type) {
+ public CCodeFunction (string! _name, string! _return_type) {
name = _name;
return_type = _return_type;
}
private List<CCodeExpression> arguments;
- public construct (CCodeExpression _call = null) {
+ public CCodeFunctionCall (CCodeExpression _call = null) {
call = _call;
}
private List<CCodeFormalParameter> parameters;
- public construct (string! n) {
+ public CCodeFunctionDeclarator (string! n) {
name = n;
}
*/
public string! name { get; set construct; }
- public construct (string! _name) {
+ public CCodeIdentifier (string! _name) {
name = _name;
}
*/
public CCodeStatement false_statement { get; set construct; }
- public construct (CCodeExpression! cond, CCodeStatement! true_stmt, CCodeStatement false_stmt = null) {
+ public CCodeIfStatement (CCodeExpression! cond, CCodeStatement! true_stmt, CCodeStatement false_stmt = null) {
condition = cond;
true_statement = true_stmt;
false_statement = false_stmt;
*/
public bool local { get; set; }
- public construct (string! _filename, bool _local = false) {
+ public CCodeIncludeDirective (string! _filename, bool _local = false) {
filename = _filename;
local = _local;
}
*/
public int line { get; set; }
- public construct (string! _filename, int _line) {
+ public CCodeLineDirective (string! _filename, int _line) {
filename = _filename;
line = _line;
}
*/
public string! replacement { get; set construct; }
- public construct (string! n, string! replace) {
+ public CCodeMacroReplacement (string! n, string! replace) {
name = n;
replacement = replace;
}
*/
public bool is_pointer { get; set; }
- public construct (CCodeExpression! container, string! member, bool pointer = false) {
+ public CCodeMemberAccess (CCodeExpression! container, string! member, bool pointer = false) {
inner = container;
member_name = member;
is_pointer = pointer;
}
- public construct pointer (CCodeExpression! container, string! member) {
+ public CCodeMemberAccess.pointer (CCodeExpression! container, string! member) {
inner = container;
member_name = member;
is_pointer = true;
*/
public string! define { get; set construct; }
- public construct (string! def) {
+ public CCodeOnceSection (string! def) {
define = def;
}
*/
public CCodeExpression! inner { get; set construct; }
- public construct (CCodeExpression! expr) {
+ public CCodeParenthesizedExpression (CCodeExpression! expr) {
inner = expr;
}
*/
public CCodeExpression return_expression { get; set; }
- public construct (CCodeExpression expr = null) {
+ public CCodeReturnStatement (CCodeExpression expr = null) {
return_expression = expr;
}
private List<CCodeDeclaration> declarations;
- public construct (string! n) {
+ public CCodeStruct (string! n) {
name = n;
}
private List<CCodeCaseStatement> case_statements;
- public construct (CCodeExpression! expr) {
+ public CCodeSwitchStatement (CCodeExpression! expr) {
expression = expr;
}
*/
public CCodeDeclarator declarator { get; set; }
- public construct (string type, CCodeDeclarator decl) {
+ public CCodeTypeDefinition (string type, CCodeDeclarator decl) {
type_name = type;
declarator = decl;
}
*/
public CCodeExpression! inner { get; set construct; }
- public construct (CCodeUnaryOperator op, CCodeExpression! expr) {
+ public CCodeUnaryExpression (CCodeUnaryOperator op, CCodeExpression! expr) {
operator = op;
inner = expr;
}
*/
public CCodeExpression initializer { get; set; }
- public construct (string! _name) {
+ public CCodeVariableDeclarator (string! _name) {
name = _name;
}
- public construct with_initializer (string! _name, CCodeExpression init) {
+ public CCodeVariableDeclarator.with_initializer (string! _name, CCodeExpression init) {
name = _name;
initializer = init;
}
*/
public CCodeStatement body { get; set; }
- public construct (CCodeExpression! cond, CCodeStatement stmt = null) {
+ public CCodeWhileStatement (CCodeExpression! cond, CCodeStatement stmt = null) {
condition = cond;
body = stmt;
}
/* at begin of line */
private bool _bol = true;
- public construct (string! _filename) {
+ public CCodeWriter (string! _filename) {
filename = _filename;
}
private ArrayResizeMethod resize_method;
- public construct (DataType! _element_type, int _rank, SourceReference! _source_reference) {
+ public Array (DataType! _element_type, int _rank, SourceReference! _source_reference) {
rank = _rank;
element_type = _element_type;
source_reference = _source_reference;
}
}
- public construct with_type_parameter (TypeParameter! _element_type_parameter, int _rank, SourceReference! _source_reference) {
+ public Array.with_type_parameter (TypeParameter! _element_type_parameter, int _rank, SourceReference! _source_reference) {
rank = _rank;
element_type_parameter = _element_type_parameter;
source_reference = _source_reference;
}
}
- Array () {
+ construct {
/* FIXME: this implementation reveals compiler bugs
string commas = "";
int i = rank - 1;
return sizes.copy ();
}
- public construct (TypeReference _element_type, int _rank, InitializerList _initializer, SourceReference source) {
+ public ArrayCreationExpression (TypeReference _element_type, int _rank, InitializerList _initializer, SourceReference source) {
element_type = _element_type;
rank = _rank;
initializer_list = _initializer;
* Represents the Array.length field.
*/
public class Vala.ArrayLengthField : Field {
- ArrayLengthField () {
+ construct {
access = MemberAccessibility.PUBLIC;
var root_symbol = source_reference.file.context.get_root ();
*
* @return newly created field
*/
- public construct (SourceReference! source) {
+ public ArrayLengthField (SourceReference! source) {
name = "length";
type_reference = new TypeReference ();
source_reference = source;
* Represents the Array.resize method.
*/
public class Vala.ArrayResizeMethod : Method {
- ArrayResizeMethod () {
+ construct {
access = MemberAccessibility.PUBLIC;
set_cname ("g_renew");
*
* @return newly created method
*/
- public construct (SourceReference! _source_reference) {
+ public ArrayResizeMethod (SourceReference! _source_reference) {
name = "resize";
return_type = new TypeReference ();
source_reference = _source_reference;
* @param source reference to source code
* @return newly created assignment
*/
- public construct (Expression! _left, Expression! _right, AssignmentOperator _op = AssignmentOperator.SIMPLE, SourceReference _source = null) {
+ public Assignment (Expression! _left, Expression! _right, AssignmentOperator _op = AssignmentOperator.SIMPLE, SourceReference _source = null) {
left = _left;
operator = _op;
right = _right;
* @param source reference to source code
* @return newly created attribute
*/
- public construct (string! _name, SourceReference source) {
+ public Attribute (string! _name, SourceReference source) {
name = _name;
source_reference = source;
}
* @param source reference to source code
* @return newly created base access expression
*/
- public construct (SourceReference source = null) {
+ public BaseAccess (SourceReference source = null) {
source_reference = source;
}
* @param source reference to source code
* @return newly created binary expression
*/
- public construct (BinaryOperator op, Expression! _left, Expression! _right, SourceReference source = null) {
+ public BinaryExpression (BinaryOperator op, Expression! _left, Expression! _right, SourceReference source = null) {
operator = op;
left = _left;
right = _right;
*
* @param source reference to source code
*/
- public construct (SourceReference source = null) {
+ public Block (SourceReference source = null) {
source_reference = source;
}
* @param source reference to source code
* @return newly created boolean literal
*/
- public construct (bool b, SourceReference source) {
+ public BooleanLiteral (bool b, SourceReference source) {
value = b;
source_reference = source;
}
* @param source reference to source code
* @return newly created break statement
*/
- public construct (SourceReference source) {
+ public BreakStatement (SourceReference source) {
source_reference = source;
}
* @param source reference to source code
* @return newly created callback
*/
- public construct (string _name, TypeReference _return_type, SourceReference source = null) {
+ public Callback (string _name, TypeReference _return_type, SourceReference source = null) {
name = _name;
return_type = _return_type;
source_reference = source;
* @param type target type
* @return newly created cast expression
*/
- public construct (Expression! _inner, TypeReference! type, SourceReference source) {
+ public CastExpression (Expression! _inner, TypeReference! type, SourceReference source) {
inner = _inner;
type_reference = type;
source_reference = source;
* @param source reference to source code
* @return newly created character literal
*/
- public construct (string! c, SourceReference source) {
+ public CharacterLiteral (string! c, SourceReference source) {
value = c;
source_reference = source;
* @param source reference to source code
* @return newly created class
*/
- public construct (string! _name, SourceReference source = null) {
+ public Class (string! _name, SourceReference source = null) {
name = _name;
source_reference = source;
}
* @param cl a class
* @return newly created class register function
*/
- public construct (Class! cl) {
+ public ClassRegisterFunction (Class! cl) {
class_reference = cl;
}
DataType slist_type;
TypeReference mutex_type;
- public construct (bool manage_memory = true) {
+ public CodeGenerator (bool manage_memory = true) {
memory_management = manage_memory;
predefined_marshal_list = new HashTable (str_hash, str_equal);
* @param false_expr expression to be evaluated if condition is false
* @return newly created conditional expression
*/
- public construct (Expression! cond, Expression! true_expr, Expression! false_expr, SourceReference source) {
+ public ConditionalExpression (Expression! cond, Expression! true_expr, Expression! false_expr, SourceReference source) {
condition = cond;
true_expression = true_expr;
false_expression = false_expr;
* @param source reference to source code
* @return newly created constant
*/
- public construct (string! _name, TypeReference! type, Expression init, SourceReference source) {
+ public Constant (string! _name, TypeReference! type, Expression init, SourceReference source) {
name = _name;
type_reference = type;
initializer = init;
* @param source reference to source code
* @return newly created constructor
*/
- public construct (SourceReference source) {
+ public Constructor (SourceReference source) {
source_reference = source;
}
* @param source reference to source code
* @return newly created continue statement
*/
- public construct (SourceReference source) {
+ public ContinueStatement (SourceReference source) {
source_reference = source;
}
* @param source reference to source code
* @return newly created declaration statement
*/
- public construct (LocalVariableDeclaration! decl, SourceReference source) {
+ public DeclarationStatement (LocalVariableDeclaration! decl, SourceReference source) {
declaration = decl;
source_reference = source;
}
* @param source reference to source code
* @return newly created destructor
*/
- public construct (SourceReference source) {
+ public Destructor (SourceReference source) {
source_reference = source;
}
* @param source reference to source code
* @return newly created do statement
*/
- public construct (Statement! _body, Expression! cond, SourceReference source) {
+ public DoStatement (Statement! _body, Expression! cond, SourceReference source) {
body = _body;
condition = cond;
source_reference = source;
return indices.copy ();
}
- public construct (Expression _container, SourceReference source) {
+ public ElementAccess (Expression _container, SourceReference source) {
container = _container;
source_reference = source;
}
* @param source reference to source code
* @return newly created empty statement
*/
- public construct (SourceReference source) {
+ public EmptyStatement (SourceReference source) {
source_reference = source;
}
* @param source reference to source code
* @return newly created enum
*/
- public construct (string! _name, SourceReference source = null) {
+ public Enum (string! _name, SourceReference source = null) {
name = _name;
source_reference = source;
}
* @param name enum value name
* @return newly created enum value
*/
- public construct (string! _name) {
+ public EnumValue (string! _name) {
name = _name;
}
* @param value numerical representation
* @return newly created enum value
*/
- public construct with_value (string! _name, Expression _value) {
+ public EnumValue.with_value (string! _name, Expression _value) {
name = _name;
value = _value;
}
* @param source reference to source code
* @return newly created expression statement
*/
- public construct (Expression! expr, SourceReference source = null) {
+ public ExpressionStatement (Expression! expr, SourceReference source = null) {
expression = expr;
source_reference = source;
}
* @param source reference to source code
* @return newly created field
*/
- public construct (string! _name, TypeReference! type, Expression init, SourceReference source) {
+ public Field (string! _name, TypeReference! type, Expression init, SourceReference source) {
name = _name;
type_reference = type;
initializer = init;
* @param source reference to source code
* @return newly created flags
*/
- public construct (string! _name, SourceReference source) {
+ public Flags (string! _name, SourceReference source) {
name = _name;
source_reference = source;
}
* @param name flags value name
* @return newly created flags value
*/
- public construct (string! _name) {
+ public FlagsValue (string! _name) {
name = _name;
}
* @param value numerical representation
* @return newly created flags value
*/
- public construct with_value (string! _name, Expression _value) {
+ public FlagsValue.with_value (string! _name, Expression _value) {
name = _name;
value = _value;
}
* @param source reference to source code
* @return newly created foreach statement
*/
- public construct (TypeReference! type, string! id, Expression! col, Statement _body, SourceReference source) {
+ public ForeachStatement (TypeReference! type, string! id, Expression! col, Statement _body, SourceReference source) {
type_reference = type;
variable_name = id;
collection = col;
* @param source reference to source code
* @return newly created formal parameter
*/
- public construct (string! _name, TypeReference type, SourceReference source = null) {
+ public FormalParameter (string! _name, TypeReference type, SourceReference source = null) {
name = _name;
type_reference = type;
source_reference = source;
* Creates a new ellipsis parameter representing an indefinite number of
* parameters.
*/
- public construct with_ellipsis (SourceReference source = null) {
+ public FormalParameter.with_ellipsis (SourceReference source = null) {
ellipsis = true;
source_reference = source;
}
* @param source reference to source code
* @return newly created for statement
*/
- public construct (Expression cond, Statement _body, SourceReference source) {
+ public ForStatement (Expression cond, Statement _body, SourceReference source) {
condition = cond;
body = _body;
source_reference = source;
* @param false_stmt statement to be evaluated if condition is false
* @return newly created if statement
*/
- public construct (Expression! cond, Block! true_stmt, Block false_stmt, SourceReference source) {
+ public IfStatement (Expression! cond, Block! true_stmt, Block false_stmt, SourceReference source) {
condition = cond;
true_statement = true_stmt;
false_statement = false_stmt;
* @param source reference to source code
* @return newly created initializer list
*/
- public construct (SourceReference source) {
+ public InitializerList (SourceReference source) {
source_reference = source;
}
* @param type the target type
* @return newly created instance cast expression
*/
- public construct (CCodeExpression! expr, DataType! type) {
+ public InstanceCast (CCodeExpression! expr, DataType! type) {
inner = expr;
type_reference = type;
}
- InstanceCast () {
+ construct {
call = new CCodeIdentifier (type_reference.get_upper_case_cname (null));
add_argument ((CCodeExpression) inner);
}
* @param source reference to source code
* @return newly created integer literal
*/
- public construct (string! i, SourceReference source = null) {
+ public IntegerLiteral (string! i, SourceReference source = null) {
value = i;
source_reference = source;
}
* @param source reference to source code
* @return newly created interface
*/
- public construct (string! _name, SourceReference source = null) {
+ public Interface (string! _name, SourceReference source = null) {
name = _name;
source_reference = source;
}
*/
public Interface! interface_reference { get; set construct; }
- public construct (Interface! iface) {
+ public InterfaceRegisterFunction (Interface! iface) {
interface_reference = iface;
}
* @param source reference to source code
* @return newly created invocation expression
*/
- public construct (Expression! _call, SourceReference source = null) {
+ public InvocationExpression (Expression! _call, SourceReference source = null) {
call = _call;
source_reference = source;
}
* @param source reference to source code
* @return newly created lambda expression
*/
- public construct (Expression! body, SourceReference source) {
+ public LambdaExpression (Expression! body, SourceReference source) {
expression_body = body;
source_reference = source;
}
* @param source reference to source code
* @return newly created lambda expression
*/
- public construct with_statement_body (Block! body, SourceReference source) {
+ public LambdaExpression.with_statement_body (Block! body, SourceReference source) {
statement_body = body;
source_reference = source;
}
* @param source reference to source code
* @return newly created literal expression
*/
- public construct (Literal! _literal, SourceReference source = null) {
+ public LiteralExpression (Literal! _literal, SourceReference source = null) {
literal = _literal;
source_reference = source;
}
* @param source reference to source code
* @return newly created local variable declaration
*/
- public construct (TypeReference type, SourceReference source) {
+ public LocalVariableDeclaration (TypeReference type, SourceReference source) {
type_reference = type;
source_reference = source;
}
* @param source reference to source code
* @return newly created local variable declaration
*/
- public construct var_type (SourceReference source) {
+ public LocalVariableDeclaration.var_type (SourceReference source) {
source_reference = source;
}
*/
public Statement! body { get; set construct; }
- public construct (Expression _resource, Statement _body, SourceReference source) {
+ public LockStatement (Expression _resource, Statement _body, SourceReference source) {
resource = _resource;
body = _body;
source_reference = source;
* @param source reference to source code
* @return newly created member access expression
*/
- public construct (Expression _inner, string! member, SourceReference source = null) {
+ public MemberAccess (Expression _inner, string! member, SourceReference source = null) {
inner = _inner;
member_name = member;
source_reference = source;
}
- public construct simple (string! member, SourceReference source = null) {
+ public MemberAccess.simple (string! member, SourceReference source = null) {
member_name = member;
source_reference = source;
}
* @param source reference to source code
* @return newly created method
*/
- public construct (string _name, TypeReference _return_type, SourceReference source = null) {
+ public Method (string _name, TypeReference _return_type, SourceReference source = null) {
name = _name;
return_type = _return_type;
source_reference = source;
* @param source reference to source code
* @return newly created named argument
*/
- public construct (string! _name, Expression! arg, SourceReference source) {
+ public NamedArgument (string! _name, Expression! arg, SourceReference source) {
name = _name;
argument = arg;
source_reference = source;
* @param source reference to source code
* @return newly created namespace
*/
- public construct (string _name, SourceReference source = null) {
+ public Namespace (string _name, SourceReference source = null) {
name = _name;
source_reference = source;
}
* @param source reference to source code
* @return newly created namespace reference
*/
- public construct (string! _name, SourceReference source) {
+ public NamespaceReference (string! _name, SourceReference source) {
name = _name;
source_reference = source;
}
* @param source reference to source code
* @return newly created null literal
*/
- public construct (SourceReference source = null) {
+ public NullLiteral (SourceReference source = null) {
source_reference = source;
}
* @param source reference to source code
* @return newly created object creation expression
*/
- public construct (MemberAccess! name, SourceReference source) {
+ public ObjectCreationExpression (MemberAccess! name, SourceReference source) {
member_name = name;
source_reference = source;
}
* @param source reference to source code
* @return newly created parenthesized expression
*/
- public construct (Expression! _inner, SourceReference source) {
+ public ParenthesizedExpression (Expression! _inner, SourceReference source) {
inner = _inner;
source_reference = source;
}
* @param source reference to source code
* @return newly created postfix expression
*/
- public construct (Expression! _inner, bool inc, SourceReference source) {
+ public PostfixExpression (Expression! _inner, bool inc, SourceReference source) {
inner = _inner;
increment = inc;
source_reference = source;
* @param source reference to source code
* @return newly created property
*/
- public construct (string! _name, TypeReference! type, PropertyAccessor _get_accessor, PropertyAccessor _set_accessor, SourceReference source) {
+ public Property (string! _name, TypeReference! type, PropertyAccessor _get_accessor, PropertyAccessor _set_accessor, SourceReference source) {
name = _name;
type_reference = type;
get_accessor = _get_accessor;
* @param source reference to source code
* @return newly created property accessor
*/
- public construct (bool _readable, bool _writable, bool _construction, Statement _body, SourceReference source) {
+ public PropertyAccessor (bool _readable, bool _writable, bool _construction, Statement _body, SourceReference source) {
readable = _readable;
writable = _writable;
construction = _construction;
* @param source reference to source code
* @return newly created real literal
*/
- public construct (string r, SourceReference source) {
+ public RealLiteral (string r, SourceReference source) {
value = r;
source_reference = source;
}
* @param source reference to source code
* @return newly created return statement
*/
- public construct (Expression result = null, SourceReference source = null) {
+ public ReturnStatement (Expression result = null, SourceReference source = null) {
return_expression = result;
source_reference = source;
}
private int next_lambda_id = 0;
- public construct (bool manage_memory = true) {
+ public SemanticAnalyzer (bool manage_memory = true) {
memory_management = manage_memory;
}
* @param source reference to source code
* @return newly created signal
*/
- public construct (string! _name, TypeReference! _return_type, SourceReference source) {
+ public Signal (string! _name, TypeReference! _return_type, SourceReference source) {
name = _name;
return_type = _return_type;
source_reference = source;
* @param pkg true if this is a VAPI package file
* @return newly created source file
*/
- public construct (CodeContext! _context, string! _filename, bool _pkg = false) {
+ public SourceFile (CodeContext! _context, string! _filename, bool _pkg = false) {
context = _context;
filename = _filename;
pkg = _pkg;
}
- SourceFile () {
+ construct {
global_namespace = new Namespace (null, new SourceReference (this));
}
* @param last_column last column number
* @return newly created source reference
*/
- public construct (SourceFile _file, int _first_line = 0, int _first_column = 0, int _last_line = 0, int _last_column = 0) {
+ public SourceReference (SourceFile _file, int _first_line = 0, int _first_column = 0, int _last_line = 0, int _last_column = 0) {
file = _file;
first_line = _first_line;
first_column = _first_column;
* @param comment code comment
* @return newly created source reference
*/
- public construct with_comment (SourceFile _file, int _first_line, int _first_column, int _last_line, int _last_column, string _comment) {
+ public SourceReference.with_comment (SourceFile _file, int _first_line, int _first_column, int _last_line, int _last_column, string _comment) {
file = _file;
first_line = _first_line;
first_column = _first_column;
* @param source reference to source code
* @return newly created string literal
*/
- public construct (string s, SourceReference source) {
+ public StringLiteral (string s, SourceReference source) {
value = s;
source_reference = source;
}
* @param source reference to source code
* @return newly created struct
*/
- public construct (string! _name, SourceReference source = null) {
+ public Struct (string! _name, SourceReference source = null) {
name = _name;
source_reference = source;
}
* @param source reference to source code
* @return newly created switch case label
*/
- public construct (Expression expr, SourceReference source = null) {
+ public SwitchLabel (Expression expr, SourceReference source = null) {
expression = expr;
source_reference = source;
}
* @param source reference to source code
* @return newly created switch default label
*/
- public construct with_default (SourceReference source = null) {
+ public SwitchLabel.with_default (SourceReference source = null) {
source_reference = source;
}
* @param source reference to source code
* @return newly created switch section
*/
- public construct (SourceReference source) {
+ public SwitchSection (SourceReference source) {
source_reference = source;
}
* @param source reference to source code
* @return newly created switch statement
*/
- public construct (Expression! expr, SourceReference source) {
+ public SwitchStatement (Expression! expr, SourceReference source) {
expression = expr;
source_reference = source;
}
* @param node the corresponding code node
* @return newly created symbol
*/
- public construct (CodeNode _node = null) {
+ public Symbol (CodeNode _node = null) {
node = _node;
}
- Symbol () {
+ construct {
active = true;
}
* @param source reference to source code
* @return newly created type check expression
*/
- public construct (Expression! expr, TypeReference! type, SourceReference source) {
+ public TypeCheck (Expression! expr, TypeReference! type, SourceReference source) {
expression = expr;
type_reference = type;
source_reference = source;
* @param source reference to source code
* @return newly created typeof expression
*/
- public construct (TypeReference! type, SourceReference source) {
+ public TypeofExpression (TypeReference! type, SourceReference source) {
type_reference = type;
source_reference = source;
}
* @param source reference to source code
* @return newly created generic type parameter
*/
- public construct (string! _name, SourceReference source) {
+ public TypeParameter (string! _name, SourceReference source) {
name = _name;
source_reference = source;
}
private List<TypeReference> type_argument_list;
- public construct () {
+ public TypeReference () {
}
/**
* @param source reference to source code
* @return newly created type reference
*/
- public construct from_name (string ns, string! type, SourceReference source = null) {
+ public TypeReference.from_name (string ns, string! type, SourceReference source = null) {
namespace_name = ns;
type_name = type;
source_reference = source;
* @param source reference to source code
* @return newly created binary expression
*/
- public construct (UnaryOperator op, Expression! _inner, SourceReference source) {
+ public UnaryExpression (UnaryOperator op, Expression! _inner, SourceReference source) {
operator = op;
inner = _inner;
source_reference = source;
* @param source reference to source code
* @return newly created variable declarator
*/
- public construct (string! _name, Expression init = null, SourceReference source = null) {
+ public VariableDeclarator (string! _name, Expression init = null, SourceReference source = null) {
name = _name;
initializer = init;
source_reference = source;
* @param source reference to source code
* @return newly created while statement
*/
- public construct (Expression! cond, Statement! _body, SourceReference source) {
+ public WhileStatement (Expression! cond, Statement! _body, SourceReference source) {
condition = cond;
body = _body;
source_reference = source;
[ReferenceType (dup_function = "g_main_loop_ref", free_function = "g_main_loop_unref")]
public struct MainLoop {
- public construct (MainContext context, bool is_running);
+ public MainLoop (MainContext context, bool is_running);
public void run ();
public void quit ();
public bool is_running ();
[ReferenceType (dup_function = "g_main_context_ref", free_function = "g_main_context_unref")]
public struct MainContext {
- public construct ();
+ public MainContext ();
public static MainContext @default ();
public bool iteration (bool may_block);
public bool pending ();
public callback int PollFunc (PollFD[] ufds, uint nfsd, int timeout_);
public struct TimeoutSource : Source {
- public construct (uint interval);
+ public TimeoutSource (uint interval);
}
public struct Timeout {
[ReferenceType ()]
public struct IdleSource : Source {
- public construct ();
+ public IdleSource ();
}
public struct Idle {
[ReferenceType ()]
public struct ChildWatchSource : Source {
- public construct (Pid pid, int status, pointer data);
+ public ChildWatchSource (Pid pid, int status, pointer data);
}
public struct ChildWatch {
[ReferenceType (dup_function = "g_source_ref", free_function = "g_source_unref")]
public struct Source {
- public construct (SourceFuncs source_funcs);
+ public Source (SourceFuncs source_funcs);
public void set_funcs (SourceFuncs funcs);
public uint attach (MainContext context);
public void destroy ();
[ReferenceType (free_function = "g_mutex_free")]
public struct Mutex {
- public construct ();
+ public Mutex ();
public void @lock ();
public bool try_lock ();
public void unlock ();
[ReferenceType (free_function = "g_cond_free")]
public struct Cond {
- public construct ();
+ public Cond ();
public void @signal ();
public void broadcast ();
public void wait (Mutex mutex);
[ReferenceType (free_function = "g_thread_pool_free")]
public struct ThreadPool {
- public construct (Func func, pointer user_data, int max_threads, bool exclusive, out Error error);
+ public ThreadPool (Func func, pointer user_data, int max_threads, bool exclusive, out Error error);
public void push (pointer data, out Error error);
public void set_max_threads (int max_threads, out Error error);
public int get_max_threads ();
[ReferenceType (dup_function = "g_async_queue_ref", free_function = "g_async_queue_unref")]
public struct AsyncQueue {
- public construct ();
+ public AsyncQueue ();
public void push (pointer data);
public void push_sorted (pointer data, CompareDataFunc func, pointer user_data);
public pointer pop ();
[ReferenceType (dup_function = "g_io_channel_ref", free_function = "g_io_channel_unref")]
public struct IOChannel {
- public construct file (string! filename, string! mode, out Error error);
+ public IOChannel file (string! filename, string! mode, out Error error);
public IOStatus read_chars (string! buf, ulong count, ref ulong bytes_read, out Error error);
public IOStatus read_unichar (ref unichar thechar, out Error error);
public IOStatus read_line (out string str_return, ref ulong length, ref ulong terminator_pos, out Error error);
[ReferenceType (dup_function = "g_rand_copy", free_function = "g_rand_free")]
public struct Rand {
- public construct with_seed (uint32 seed);
+ public Rand.with_seed (uint32 seed);
[NoArrayLength ()]
- public construct with_seed_array (uint32[] seed, uint seed_length);
- public construct ();
+ public Rand.with_seed_array (uint32[] seed, uint seed_length);
+ public Rand ();
public void set_seed (uint32 seed);
[NoArrayLength ()]
public void set_seed_array (uint32[] seed, uint seed_length);
[ReferenceType (free_function = "g_mapped_file_free")]
public struct MappedFile {
- public construct (string filename, bool writable, out Error error);
+ public MappedFile (string filename, bool writable, out Error error);
public void free ();
public long get_length ();
public char[] get_contents ();
[ReferenceType (free_function = "g_option_context_free")]
public struct OptionContext {
- public construct (string parameter_string);
+ public OptionContext (string parameter_string);
public bool parse (out string[] argv, out Error error);
public void set_help_enabled (bool help_enabled);
[NoArrayLength ()]
[ReferenceType (free_function = "g_markup_parse_context_free")]
public struct MarkupParseContext {
- public construct (MarkupParser parser, MarkupParseFlags _flags, pointer user_data, DestroyNotify user_data_dnotify);
+ public MarkupParseContext (MarkupParser parser, MarkupParseFlags _flags, pointer user_data, DestroyNotify user_data_dnotify);
public bool parse (string text, long text_len, out Error error);
}
[ReferenceType (free_function = "g_key_file_free")]
public struct KeyFile {
- public construct ();
+ public KeyFile ();
public void set_list_separator (char separator);
public bool load_from_file (string! file, KeyFileFlags @flags, out Error error);
public bool load_from_data (string! data, ulong length, KeyFileFlags @flags, out Error error);
public List<G> tail;
public uint length;
- public construct ();
+ public Queue ();
public bool is_empty ();
public uint get_length ();
[ReferenceType (dup_function = "g_hash_table_ref", free_function = "g_hash_table_unref")]
public struct HashTable<K,V> {
- public construct (HashFunc hash_func, EqualFunc key_equal_func);
- public construct full (HashFunc hash_func, EqualFunc key_equal_func, DestroyNotify key_destroy_func, DestroyNotify value_destroy_func);
+ public HashTable (HashFunc hash_func, EqualFunc key_equal_func);
+ public HashTable.full (HashFunc hash_func, EqualFunc key_equal_func, DestroyNotify key_destroy_func, DestroyNotify value_destroy_func);
public void insert (ref K key, ref V value);
public void replace (ref K key, ref V value);
public V lookup (K key);
[ReferenceType (free_function = "g_string_free")]
public struct String {
- public construct (string init = "");
+ public String (string init = "");
[CCode (cname = "g_string_sized_new")]
- public construct sized (ulong dfl_size);
+ public String.sized (ulong dfl_size);
public String assign (string! rval);
public String append (string! val);
public String append_c (char c);
[ReferenceType ()]
public struct Array<G> {
- public construct (bool zero_terminated, bool clear, uint element_size);
+ public Array (bool zero_terminated, bool clear, uint element_size);
[CCode (cname = "g_array_sized_new")]
- public construct sized (bool zero_terminated, bool clear, uint element_size, uint reserved_size);
+ public Array.sized (bool zero_terminated, bool clear, uint element_size, uint reserved_size);
[ReturnsModifiedPointer ()]
public void append_val (G value);
[ReturnsModifiedPointer ()]
[ReferenceType (free_function = "g_tree_destroy")]
public struct Tree<K,V> {
- public construct (CompareFunc key_compare_func);
- public construct with_data (CompareFunc key_compare_func, pointer key_compare_data);
- public construct full (CompareFunc key_compare_func, pointer key_compare_data, DestroyNotify key_destroy_func, DestroyNotify value_destroy_func);
+ public Tree (CompareFunc key_compare_func);
+ public Tree.with_data (CompareFunc key_compare_func, pointer key_compare_data);
+ public Tree.full (CompareFunc key_compare_func, pointer key_compare_data, DestroyNotify key_destroy_func, DestroyNotify value_destroy_func);
public void insert (K key, V value);
public void replace (K key, V value);
public int nnodes ();