F diff --git a/src/backend/js/transpile_to_js.h b/src/backend/js/transpile_to_js.h --- a/src/backend/js/transpile_to_js.h +++ b/src/backend/js/transpile_to_js.hvoid to_js_print_binary_expression_tree(FILE* out,struct AST_Binary_Expression *bin,struct Program *program);void to_js_print_conditional_expression_tree(FILE* out,struct AST_Conditional_Expression *cond,struct Program *program);void to_js_print_function_expression_tree(FILE* out,struct AST_Function_Expression *function_call,struct Program *program);- void to_js_print_lvalue_expression_tree(FILE* out,struct AST_Lvalue_Expression *lval,struct Program *program);+ //void to_js_print_lvalue_expression_tree(FILE* out,struct AST_Lvalue_Expression *lval,struct Program *program);void to_js_print_unary_expression_tree(FILE* out,struct AST_Unary_Expression *unary,struct Program *program);void to_js_print_labeled_statement_tree(FILE* out,struct AST_Labeled_Statement *label,struct Program *program);void to_js_print_compound_statement_tree(FILE* out,struct AST_Compound_Statement *compound,struct Program *program);F diff --git a/src/backend/print/print.h b/src/backend/print/print.h --- a/src/backend/print/print.h +++ b/src/backend/print/print.hvoid print_unary_expression_tree(FILE *out,struct AST_Unary_Expression *unary_expression);void print_constant_tree(FILE *out,struct AST_Constant *constant);void print_string_literal(FILE *out,struct AST_String_Literal *string);- void print_lvalue_expression_tree(FILE *out,struct AST_Lvalue_Expression *lval);+ //void print_lvalue_expression_tree(FILE *out,struct AST_Lvalue_Expression *lval);void print_labeled_statement_tree(FILE *out,struct AST_Labeled_Statement *lab);void print_compound_statement_tree(FILE *out,struct AST_Compound_Statement *comp);void print_if_statement_tree(FILE *out,struct AST_If_Statement *ifs);F diff --git a/src/frontend/parse/parse_expression.c b/src/frontend/parse/parse_expression.c --- a/src/frontend/parse/parse_expression.c +++ b/src/frontend/parse/parse_expression.c{case KW_STRING:case KW_WIDE_STRING:- return (struct AST*)get_string_literal_tree(hold_token);+ return (struct AST*)get_string_literal_tree(get_expression_value_constant(extract_literal_string(hold_token,translation_data)));case KW_CHAR_CONSTANT:- return (struct AST*)get_constant_tree(get_expression_value_constant(extract_literal_char(token,translation_data)));+ return (struct AST*)get_constant_tree(get_expression_value_constant(extract_literal_char(hold_token,translation_data)));case KW_WIDE_CHAR_CONSTANT:- return (struct AST*)get_constant_tree(get_expression_value_constant(extract_literal_wide_char(token,translation_data)));+ return (struct AST*)get_constant_tree(get_expression_value_constant(extract_literal_wide_char(hold_token,translation_data)));case KW_HEXADECIMAL_CONSTANT:case KW_UNSIGNED_LONG_HEXADECIMAL_CONSTANT:case KW_UNSIGNED_LONG_LONG_HEXADECIMAL_CONSTANT:case KW_UNSIGNED_HEXADECIMAL_CONSTANT:case KW_LONG_HEXADECIMAL_CONSTANT:case KW_LONG_LONG_HEXADECIMAL_CONSTANT:- return (struct AST*)get_constant_tree(get_expression_value_constant(extract_literal_integer_hex(token,translation_data)));+ return (struct AST*)get_constant_tree(get_expression_value_constant(extract_literal_integer_hex(hold_token,translation_data)));case KW_DECIMAL_CONSTANT:case KW_UNSIGNED_LONG_LONG_DECIMAL_CONSTANT:case KW_UNSIGNED_DECIMAL_CONSTANT:case KW_LONG_DECIMAL_CONSTANT:case KW_LONG_LONG_DECIMAL_CONSTANT:- return (struct AST*)get_constant_tree(get_expression_value_constant(extract_literal_integer_dec(token,translation_data)));+ return (struct AST*)get_constant_tree(get_expression_value_constant(extract_literal_integer_dec(hold_token,translation_data)));case KW_OCTAL_CONSTANT:case KW_UNSIGNED_OCTAL_CONSTANT:case KW_DOUBLE_DECIMAL_CONSTANT:case KW_LONG_DOUBLE_DECIMAL_CONSTANT:case KW_FLOAT_DECIMAL_CONSTANT:- return (struct AST*)get_constant_tree(get_expression_value_constant(extract_literal_double_dec(token,translation_data)));+ return (struct AST*)get_constant_tree(get_expression_value_constant(extract_literal_double_dec(hold_token,translation_data)));case KW_DOUBLE_HEXADECIMAL_CONSTANT:case KW_LONG_DOUBLE_HEXADECIMAL_CONSTANT:case KW_FLOAT_HEXADECIMAL_CONSTANT:- return (struct AST*)get_constant_tree(get_expression_value_constant(extract_literal_double_hex(token,translation_data)));+ return (struct AST*)get_constant_tree(get_expression_value_constant(extract_literal_double_hex(hold_token,translation_data)));case KW_ID:return (struct AST*)get_designator_tree(hold_token,scope,translation_data);F diff --git a/src/semantics/ast.c b/src/semantics/ast.c --- a/src/semantics/ast.c +++ b/src/semantics/ast.creturn ret;}++ struct AST_Binary_Expression* get_struct_union_member_tree(struct AST *left,struct token *id,enum AST_Type struct_or_union)+ {+ }+struct AST_Conditional_Expression* get_conditional_expression_tree(struct AST *left,struct AST *center,struct AST *right){struct AST_Conditional_Expression *ret;F diff --git a/src/semantics/ast.h b/src/semantics/ast.h --- a/src/semantics/ast.h +++ b/src/semantics/ast.h#include <parse_declaration.h>#include <denoted.h>#include <linkage.h>+ #include <value.h>struct AST_Error* get_error_tree(struct AST *error);struct AST_Declaration_Error* get_declaration_error_tree(struct Denoted *error);struct AST_Binary_Expression* get_binary_expression_tree(struct AST *left,struct AST *right,enum AST_Type type);++ struct AST_Binary_Expression* get_struct_union_member_tree(struct AST *left,struct token *id,enum AST_Type struct_or_union);+struct AST_Conditional_Expression* get_conditional_expression_tree(struct AST *left,struct AST *center,struct AST *right);struct AST_Function_Expression* get_function_expression_tree(struct AST* id,struct Scope *scope);struct AST_Unary_Expression* get_unary_expression_tree(struct AST *operand,enum AST_Type type);-----struct AST_Constant* get_constant_tree(struct Expression_Value *value);struct AST_String_Literal* get_string_literal_tree(struct Expression_Value *value);struct AST_Designator* get_designator_tree(struct token *id,struct Scope* scope,struct Translation_Data *translation_data);---struct AST_Labeled_Statement* get_labeled_statement_tree(struct token *label,struct AST* statement,enum AST_Type type);struct AST_Compound_Statement* get_compound_statement_tree(struct Scope *parent_scope);struct AST_If_Statement* get_if_statement_tree();+void delete_ast(struct AST* ast);void delete_ast_error(struct AST_Error *error);void delete_ast_declaration_error(struct AST_Declaration_Error *error);F diff --git a/src/semantics/value/value.hh b/src/semantics/value/value.hh --- a/src/semantics/value/value.hh +++ b/src/semantics/value/value.hhstruct Expression_Value;struct Expression_Value_LValue;- struct Expression_Value_Temp_Value+ struct Expression_Value_Temp_Value;struct Expression_Value_Constant;struct Expression_Value_Function_Designator;