diff options
author | Alexandre Petit-Bianco <apbianco@cygnus.com> | 1998-12-09 15:50:12 +0000 |
---|---|---|
committer | Alexandre Petit-Bianco <apbianco@gcc.gnu.org> | 1998-12-09 07:50:12 -0800 |
commit | f8976021c4079ce1461fffb45622437ec13ff597 (patch) | |
tree | 136a2facf7b183653374d398723981a6e03e7777 /gcc/java/lex.c | |
parent | 996d0685a14687f870f96f29fc95e1ba8f71900c (diff) | |
download | gcc-f8976021c4079ce1461fffb45622437ec13ff597.zip gcc-f8976021c4079ce1461fffb45622437ec13ff597.tar.gz gcc-f8976021c4079ce1461fffb45622437ec13ff597.tar.bz2 |
java-tree.def (NEW_ARRAY_INIT): New Java tree code.
Wed Dec 9 15:37:05 1998 Alexandre Petit-Bianco <apbianco@cygnus.com>
* java-tree.def (NEW_ARRAY_INIT): New Java tree code.
* lex.c (java_lex): Remember column position before advancing one
token. Retain location information on OCB_TK.
* lex.h (typedef struct java_lc): Added new field.
* parse.h (GET_SKIP_TYPE): New macro.
(QUAL_DECL_TYPE): Redefined using GET_SKIP_TYPE.
* parse.y (build_new_array_init, patch_new_array_init,
patch_array_constructor, maybe_build_array_element_wfl,
array_constructor_check_entry): New function prototypes.
(switch_block:): Tagged <node>.
(OCB_TK): Tagged <operator>.
(array_initializer:): Installed actions.
(variable_initializer): Build location information on element if
necessary.
(switch_statement:): Fixed indentation typo.
(switch_block:): Redefined default action.
(java_complete_tree): Handle NEW_ARRAY_INIT in MODIFY_EXPR:.
(patch_assignment): Removed duplicate code.
(maybe_build_array_element_wfl, build_new_array_init,
patch_new_array_init, patch_array_constructor,
array_constructor_check_entry): New functions.
Parse and walk array initializer nodes.
From-SVN: r24224
Diffstat (limited to 'gcc/java/lex.c')
-rw-r--r-- | gcc/java/lex.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/java/lex.c b/gcc/java/lex.c index e645b40..b8b635a 100644 --- a/gcc/java/lex.c +++ b/gcc/java/lex.c @@ -567,6 +567,7 @@ java_lex (java_lval) } ctxp->elc.line = ctxp->c_line->lineno; + ctxp->elc.prev_col = ctxp->elc.col; ctxp->elc.col = ctxp->c_line->char_col - JAVA_COLUMN_DELTA (-1); if (ctxp->elc.col < 0) fatal ("ctxp->elc.col < 0 - java_lex"); @@ -924,7 +925,7 @@ java_lex (java_lval) if (ctxp->ccb_indent == 1) ctxp->first_ccb_indent1 = lineno; ctxp->ccb_indent++; - return OCB_TK; + BUILD_OPERATOR (OCB_TK); case '}': JAVA_LEX_SEP (c); ctxp->ccb_indent--; |