projects
/
cparser
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Simplify macro mumbo jumbo.
[cparser]
/
ast_t.h
diff --git
a/ast_t.h
b/ast_t.h
index
c5699c9
..
1c0141d
100644
(file)
--- a/
ast_t.h
+++ b/
ast_t.h
@@
-81,10
+81,8
@@
typedef enum expression_kind_t {
EXPR_ALIGNOF,
EXPR_FUNCNAME,
EXPR_ALIGNOF,
EXPR_FUNCNAME,
- EXPR_BUILTIN_SYMBOL,
EXPR_BUILTIN_CONSTANT_P,
EXPR_BUILTIN_TYPES_COMPATIBLE_P,
EXPR_BUILTIN_CONSTANT_P,
EXPR_BUILTIN_TYPES_COMPATIBLE_P,
- EXPR_BUILTIN_PREFETCH,
EXPR_OFFSETOF,
EXPR_VA_START,
EXPR_VA_ARG,
EXPR_OFFSETOF,
EXPR_VA_START,
EXPR_VA_ARG,
@@
-227,13
+225,16
@@
typedef enum funcname_kind_t {
EXPR_UNARY_CASES_MANDATORY \
EXPR_UNARY_CASES_OPTIONAL
EXPR_UNARY_CASES_MANDATORY \
EXPR_UNARY_CASES_OPTIONAL
+/**
+ * The base class of every expression.
+ */
struct expression_base_t {
struct expression_base_t {
- expression_kind_t kind;
- type_t *type;
- source_position_t source_position;
+ expression_kind_t kind;
/**< The expression kind. */
+ type_t *type;
/**< The type of the expression. */
+ source_position_t source_position;
/**< The source position of this expression. */
bool parenthesized;
#ifndef NDEBUG
bool parenthesized;
#ifndef NDEBUG
- bool transformed;
+ bool transformed;
/**< Set if this expression was transformed. */
#endif
};
#endif
};
@@
-271,11
+272,6
@@
struct compound_literal_expression_t {
initializer_t *initializer;
};
initializer_t *initializer;
};
-struct builtin_symbol_expression_t {
- expression_base_t base;
- symbol_t *symbol;
-};
-
struct builtin_constant_expression_t {
expression_base_t base;
expression_t *value;
struct builtin_constant_expression_t {
expression_base_t base;
expression_t *value;
@@
-287,13
+283,6
@@
struct builtin_types_compatible_expression_t {
type_t *right;
};
type_t *right;
};
-struct builtin_prefetch_expression_t {
- expression_base_t base;
- expression_t *adr;
- expression_t *rw;
- expression_t *locality;
-};
-
struct reference_expression_t {
expression_base_t base;
entity_t *entity;
struct reference_expression_t {
expression_base_t base;
entity_t *entity;
@@
-394,10
+383,8
@@
union expression_t {
string_literal_expression_t string;
wide_string_literal_expression_t wide_string;
compound_literal_expression_t compound_literal;
string_literal_expression_t string;
wide_string_literal_expression_t wide_string;
compound_literal_expression_t compound_literal;
- builtin_symbol_expression_t builtin_symbol;
builtin_constant_expression_t builtin_constant;
builtin_types_compatible_expression_t builtin_types_compatible;
builtin_constant_expression_t builtin_constant;
builtin_types_compatible_expression_t builtin_types_compatible;
- builtin_prefetch_expression_t builtin_prefetch;
reference_expression_t reference;
call_expression_t call;
unary_expression_t unary;
reference_expression_t reference;
call_expression_t call;
unary_expression_t unary;
@@
-535,6
+522,9
@@
typedef enum gnu_attribute_kind_t {
GNU_AK_LAST
} gnu_attribute_kind_t;
GNU_AK_LAST
} gnu_attribute_kind_t;
+/**
+ * The statement kinds.
+ */
typedef enum statement_kind_t {
STATEMENT_INVALID,
STATEMENT_EMPTY,
typedef enum statement_kind_t {
STATEMENT_INVALID,
STATEMENT_EMPTY,
@@
-557,6
+547,9
@@
typedef enum statement_kind_t {
STATEMENT_LEAVE /**< MS __leave */
} statement_kind_t;
STATEMENT_LEAVE /**< MS __leave */
} statement_kind_t;
+/**
+ * The base class of every statement.
+ */
struct statement_base_t {
statement_kind_t kind;
statement_t *next;
struct statement_base_t {
statement_kind_t kind;
statement_t *next;