Logo Search packages:      
Sourcecode: vala version File versions

valacodenode.h

/* valacodenode.vala
 *
 * Copyright (C) 2006-2007  Jürg Billeter
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.

 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.

 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
 *
 * Author:
 *    Jürg Billeter <j@bitron.ch>
 */

#ifndef __VALACODENODE_H__
#define __VALACODENODE_H__

#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <ccode/valaccodenode.h>

G_BEGIN_DECLS

typedef struct _ValaAddressofExpression ValaAddressofExpression;
typedef struct _ValaAddressofExpressionClass ValaAddressofExpressionClass;
typedef struct _ValaExpression ValaExpression;
typedef struct _ValaExpressionClass ValaExpressionClass;
typedef struct _ValaCodeNode ValaCodeNode;
typedef struct _ValaCodeNodeClass ValaCodeNodeClass;
typedef struct _ValaCodeVisitor ValaCodeVisitor;
typedef struct _ValaCodeVisitorClass ValaCodeVisitorClass;
typedef struct _ValaSourceFile ValaSourceFile;
typedef struct _ValaSourceFileClass ValaSourceFileClass;
typedef struct _ValaCodeContext ValaCodeContext;
typedef struct _ValaCodeContextClass ValaCodeContextClass;
typedef struct _ValaMethod ValaMethod;
typedef struct _ValaMethodClass ValaMethodClass;
typedef struct _ValaMember ValaMember;
typedef struct _ValaMemberClass ValaMemberClass;
typedef struct _ValaSymbol ValaSymbol;
typedef struct _ValaSymbolClass ValaSymbolClass;
typedef struct _ValaScope ValaScope;
typedef struct _ValaScopeClass ValaScopeClass;
typedef struct _ValaInvokable ValaInvokable;
typedef struct _ValaInvokableIface ValaInvokableIface;
typedef struct _ValaTypeReference ValaTypeReference;
typedef struct _ValaTypeReferenceClass ValaTypeReferenceClass;
typedef struct _ValaSourceReference ValaSourceReference;
typedef struct _ValaSourceReferenceClass ValaSourceReferenceClass;
typedef struct _ValaDataType ValaDataType;
typedef struct _ValaDataTypeClass ValaDataTypeClass;
typedef struct _ValaPointer ValaPointer;
typedef struct _ValaPointerClass ValaPointerClass;
typedef struct _ValaArray ValaArray;
typedef struct _ValaArrayClass ValaArrayClass;
typedef struct _ValaTypeParameter ValaTypeParameter;
typedef struct _ValaTypeParameterClass ValaTypeParameterClass;
typedef struct _ValaArrayLengthField ValaArrayLengthField;
typedef struct _ValaArrayLengthFieldClass ValaArrayLengthFieldClass;
typedef struct _ValaField ValaField;
typedef struct _ValaFieldClass ValaFieldClass;
typedef struct _ValaAttribute ValaAttribute;
typedef struct _ValaAttributeClass ValaAttributeClass;
typedef struct _ValaNamedArgument ValaNamedArgument;
typedef struct _ValaNamedArgumentClass ValaNamedArgumentClass;
typedef struct _ValaArrayResizeMethod ValaArrayResizeMethod;
typedef struct _ValaArrayResizeMethodClass ValaArrayResizeMethodClass;
typedef struct _ValaArrayMoveMethod ValaArrayMoveMethod;
typedef struct _ValaArrayMoveMethodClass ValaArrayMoveMethodClass;
typedef struct _ValaFormalParameter ValaFormalParameter;
typedef struct _ValaFormalParameterClass ValaFormalParameterClass;
typedef struct _ValaBlock ValaBlock;
typedef struct _ValaBlockClass ValaBlockClass;
typedef struct _ValaStatement ValaStatement;
typedef struct _ValaStatementIface ValaStatementIface;
typedef struct _ValaVariableDeclarator ValaVariableDeclarator;
typedef struct _ValaVariableDeclaratorClass ValaVariableDeclaratorClass;
typedef struct _ValaNamespace ValaNamespace;
typedef struct _ValaNamespaceClass ValaNamespaceClass;
typedef struct _ValaClass ValaClass;
typedef struct _ValaClassClass ValaClassClass;
typedef struct _ValaConstant ValaConstant;
typedef struct _ValaConstantClass ValaConstantClass;
typedef struct _ValaProperty ValaProperty;
typedef struct _ValaPropertyClass ValaPropertyClass;
typedef struct _ValaPropertyAccessor ValaPropertyAccessor;
typedef struct _ValaPropertyAccessorClass ValaPropertyAccessorClass;
typedef struct _ValaSignal ValaSignal;
typedef struct _ValaSignalClass ValaSignalClass;
typedef struct _ValaCallback ValaCallback;
typedef struct _ValaCallbackClass ValaCallbackClass;
typedef struct _ValaStruct ValaStruct;
typedef struct _ValaStructClass ValaStructClass;
typedef struct _ValaConstructor ValaConstructor;
typedef struct _ValaConstructorClass ValaConstructorClass;
typedef struct _ValaDestructor ValaDestructor;
typedef struct _ValaDestructorClass ValaDestructorClass;
typedef struct _ValaInterface ValaInterface;
typedef struct _ValaInterfaceClass ValaInterfaceClass;
typedef struct _ValaEnum ValaEnum;
typedef struct _ValaEnumClass ValaEnumClass;
typedef struct _ValaEnumValue ValaEnumValue;
typedef struct _ValaEnumValueClass ValaEnumValueClass;
typedef struct _ValaNamespaceReference ValaNamespaceReference;
typedef struct _ValaNamespaceReferenceClass ValaNamespaceReferenceClass;
typedef struct _ValaSourceFileCycle ValaSourceFileCycle;
typedef struct _ValaSourceFileCycleClass ValaSourceFileCycleClass;
typedef struct _ValaCreationMethod ValaCreationMethod;
typedef struct _ValaCreationMethodClass ValaCreationMethodClass;
typedef struct _ValaEmptyStatement ValaEmptyStatement;
typedef struct _ValaEmptyStatementClass ValaEmptyStatementClass;
typedef struct _ValaDeclarationStatement ValaDeclarationStatement;
typedef struct _ValaDeclarationStatementClass ValaDeclarationStatementClass;
typedef struct _ValaLocalVariableDeclaration ValaLocalVariableDeclaration;
typedef struct _ValaLocalVariableDeclarationClass ValaLocalVariableDeclarationClass;
typedef struct _ValaInitializerList ValaInitializerList;
typedef struct _ValaInitializerListClass ValaInitializerListClass;
typedef struct _ValaExpressionStatement ValaExpressionStatement;
typedef struct _ValaExpressionStatementClass ValaExpressionStatementClass;
typedef struct _ValaIfStatement ValaIfStatement;
typedef struct _ValaIfStatementClass ValaIfStatementClass;
typedef struct _ValaSwitchStatement ValaSwitchStatement;
typedef struct _ValaSwitchStatementClass ValaSwitchStatementClass;
typedef struct _ValaSwitchSection ValaSwitchSection;
typedef struct _ValaSwitchSectionClass ValaSwitchSectionClass;
typedef struct _ValaSwitchLabel ValaSwitchLabel;
typedef struct _ValaSwitchLabelClass ValaSwitchLabelClass;
typedef struct _ValaWhileStatement ValaWhileStatement;
typedef struct _ValaWhileStatementClass ValaWhileStatementClass;
typedef struct _ValaDoStatement ValaDoStatement;
typedef struct _ValaDoStatementClass ValaDoStatementClass;
typedef struct _ValaForStatement ValaForStatement;
typedef struct _ValaForStatementClass ValaForStatementClass;
typedef struct _ValaForeachStatement ValaForeachStatement;
typedef struct _ValaForeachStatementClass ValaForeachStatementClass;
typedef struct _ValaBreakStatement ValaBreakStatement;
typedef struct _ValaBreakStatementClass ValaBreakStatementClass;
typedef struct _ValaContinueStatement ValaContinueStatement;
typedef struct _ValaContinueStatementClass ValaContinueStatementClass;
typedef struct _ValaReturnStatement ValaReturnStatement;
typedef struct _ValaReturnStatementClass ValaReturnStatementClass;
typedef struct _ValaThrowStatement ValaThrowStatement;
typedef struct _ValaThrowStatementClass ValaThrowStatementClass;
typedef struct _ValaTryStatement ValaTryStatement;
typedef struct _ValaTryStatementClass ValaTryStatementClass;
typedef struct _ValaCatchClause ValaCatchClause;
typedef struct _ValaCatchClauseClass ValaCatchClauseClass;
typedef struct _ValaLockStatement ValaLockStatement;
typedef struct _ValaLockStatementClass ValaLockStatementClass;
typedef struct _ValaArrayCreationExpression ValaArrayCreationExpression;
typedef struct _ValaArrayCreationExpressionClass ValaArrayCreationExpressionClass;
typedef struct _ValaBooleanLiteral ValaBooleanLiteral;
typedef struct _ValaBooleanLiteralClass ValaBooleanLiteralClass;
typedef struct _ValaLiteral ValaLiteral;
typedef struct _ValaLiteralClass ValaLiteralClass;
typedef struct _ValaCharacterLiteral ValaCharacterLiteral;
typedef struct _ValaCharacterLiteralClass ValaCharacterLiteralClass;
typedef struct _ValaIntegerLiteral ValaIntegerLiteral;
typedef struct _ValaIntegerLiteralClass ValaIntegerLiteralClass;
typedef struct _ValaRealLiteral ValaRealLiteral;
typedef struct _ValaRealLiteralClass ValaRealLiteralClass;
typedef struct _ValaStringLiteral ValaStringLiteral;
typedef struct _ValaStringLiteralClass ValaStringLiteralClass;
typedef struct _ValaNullLiteral ValaNullLiteral;
typedef struct _ValaNullLiteralClass ValaNullLiteralClass;
typedef struct _ValaLiteralExpression ValaLiteralExpression;
typedef struct _ValaLiteralExpressionClass ValaLiteralExpressionClass;
typedef struct _ValaParenthesizedExpression ValaParenthesizedExpression;
typedef struct _ValaParenthesizedExpressionClass ValaParenthesizedExpressionClass;
typedef struct _ValaMemberAccess ValaMemberAccess;
typedef struct _ValaMemberAccessClass ValaMemberAccessClass;
typedef struct _ValaInvocationExpression ValaInvocationExpression;
typedef struct _ValaInvocationExpressionClass ValaInvocationExpressionClass;
typedef struct _ValaElementAccess ValaElementAccess;
typedef struct _ValaElementAccessClass ValaElementAccessClass;
typedef struct _ValaBaseAccess ValaBaseAccess;
typedef struct _ValaBaseAccessClass ValaBaseAccessClass;
typedef struct _ValaPostfixExpression ValaPostfixExpression;
typedef struct _ValaPostfixExpressionClass ValaPostfixExpressionClass;
typedef struct _ValaObjectCreationExpression ValaObjectCreationExpression;
typedef struct _ValaObjectCreationExpressionClass ValaObjectCreationExpressionClass;
typedef struct _ValaSizeofExpression ValaSizeofExpression;
typedef struct _ValaSizeofExpressionClass ValaSizeofExpressionClass;
typedef struct _ValaTypeofExpression ValaTypeofExpression;
typedef struct _ValaTypeofExpressionClass ValaTypeofExpressionClass;
typedef struct _ValaUnaryExpression ValaUnaryExpression;
typedef struct _ValaUnaryExpressionClass ValaUnaryExpressionClass;
typedef struct _ValaCastExpression ValaCastExpression;
typedef struct _ValaCastExpressionClass ValaCastExpressionClass;
typedef struct _ValaPointerIndirection ValaPointerIndirection;
typedef struct _ValaPointerIndirectionClass ValaPointerIndirectionClass;
typedef struct _ValaReferenceTransferExpression ValaReferenceTransferExpression;
typedef struct _ValaReferenceTransferExpressionClass ValaReferenceTransferExpressionClass;
typedef struct _ValaBinaryExpression ValaBinaryExpression;
typedef struct _ValaBinaryExpressionClass ValaBinaryExpressionClass;
typedef struct _ValaTypeCheck ValaTypeCheck;
typedef struct _ValaTypeCheckClass ValaTypeCheckClass;
typedef struct _ValaConditionalExpression ValaConditionalExpression;
typedef struct _ValaConditionalExpressionClass ValaConditionalExpressionClass;
typedef struct _ValaLambdaExpression ValaLambdaExpression;
typedef struct _ValaLambdaExpressionClass ValaLambdaExpressionClass;
typedef struct _ValaAssignment ValaAssignment;
typedef struct _ValaAssignmentClass ValaAssignmentClass;

#define VALA_TYPE_CODE_NODE (vala_code_node_get_type ())
#define VALA_CODE_NODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_CODE_NODE, ValaCodeNode))
#define VALA_CODE_NODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_CODE_NODE, ValaCodeNodeClass))
#define VALA_IS_CODE_NODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_CODE_NODE))
#define VALA_IS_CODE_NODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_CODE_NODE))
#define VALA_CODE_NODE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_CODE_NODE, ValaCodeNodeClass))

typedef struct _ValaCodeNodePrivate ValaCodeNodePrivate;

/**
 * Represents a part of the parsed source code.
 *
 * Code nodes get created by the parser and are used throughout the whole
 * compilation process.
 */
00230 struct _ValaCodeNode {
      GObject parent;
      ValaCodeNodePrivate * priv;
      GList* attributes;
};
struct _ValaCodeNodeClass {
      GObjectClass parent;
      void (*accept) (ValaCodeNode* self, ValaCodeVisitor* visitor);
      void (*accept_children) (ValaCodeNode* self, ValaCodeVisitor* visitor);
      void (*replace) (ValaCodeNode* self, ValaCodeNode* old_node, ValaCodeNode* new_node);
      char* (*to_string) (ValaCodeNode* self);
};

void vala_code_node_accept (ValaCodeNode* self, ValaCodeVisitor* visitor);
void vala_code_node_accept_children (ValaCodeNode* self, ValaCodeVisitor* visitor);
void vala_code_node_replace (ValaCodeNode* self, ValaCodeNode* old_node, ValaCodeNode* new_node);
ValaAttribute* vala_code_node_get_attribute (ValaCodeNode* self, const char* name);
char* vala_code_node_to_string (ValaCodeNode* self);
ValaCodeNode* vala_code_node_get_parent_node (ValaCodeNode* self);
void vala_code_node_set_parent_node (ValaCodeNode* self, ValaCodeNode* value);
ValaSourceReference* vala_code_node_get_source_reference (ValaCodeNode* self);
void vala_code_node_set_source_reference (ValaCodeNode* self, ValaSourceReference* value);
ValaCCodeNode* vala_code_node_get_ccodenode (ValaCodeNode* self);
void vala_code_node_set_ccodenode (ValaCodeNode* self, ValaCCodeNode* value);
gboolean vala_code_node_get_error (ValaCodeNode* self);
void vala_code_node_set_error (ValaCodeNode* self, gboolean value);
gboolean vala_code_node_get_tree_can_fail (ValaCodeNode* self);
void vala_code_node_set_tree_can_fail (ValaCodeNode* self, gboolean value);
GType vala_code_node_get_type (void);

G_END_DECLS

#endif

Generated by  Doxygen 1.6.0   Back to index