Skip to content

Commit

Permalink
Restore ANJUTA_TOKEN_VARIABLE to avoid a crash with autotools project
Browse files Browse the repository at this point in the history
  • Loading branch information
sgranjoux committed Oct 14, 2009
1 parent 25d5cbe commit 2ba01da
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion libanjuta/anjuta-token.c
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ anjuta_token_evaluate_token (AnjutaToken *token, GString *value, gboolean raw)
case ANJUTA_TOKEN_OPEN_QUOTE:
case ANJUTA_TOKEN_CLOSE_QUOTE:
case ANJUTA_TOKEN_ESCAPE:
case ANJUTA_TOKEN_VARIABLE:
case ANJUTA_TOKEN_MACRO:
case ANJUTA_TOKEN_EOV:
return;
default:
Expand Down
4 changes: 2 additions & 2 deletions libanjuta/anjuta-token.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ typedef enum

ANJUTA_TOKEN_FIRST = 16384,
ANJUTA_TOKEN_FILE,
ANJUTA_TOKEN_VARIABLE,
ANJUTA_TOKEN_MACRO,
ANJUTA_TOKEN_EOV,
ANJUTA_TOKEN_PARSED,
ANJUTA_TOKEN_KEYWORD,
ANJUTA_TOKEN_OPERATOR,
ANJUTA_TOKEN_NAME,
ANJUTA_TOKEN_VALUE,
ANJUTA_TOKEN_MACRO,
ANJUTA_TOKEN_VARIABLE,
ANJUTA_TOKEN_DEFINITION,
ANJUTA_TOKEN_STATEMENT,
ANJUTA_TOKEN_NUMBER,
Expand Down
2 changes: 1 addition & 1 deletion src/mk-project.c
Original file line number Diff line number Diff line change
Expand Up @@ -980,7 +980,7 @@ mkp_project_token_evaluate_token (MkpProject *project, AnjutaToken *token, GStri
case ANJUTA_TOKEN_OPEN_QUOTE:
case ANJUTA_TOKEN_CLOSE_QUOTE:
case ANJUTA_TOKEN_ESCAPE:
case ANJUTA_TOKEN_VARIABLE:
case ANJUTA_TOKEN_MACRO:
case ANJUTA_TOKEN_EOV:
break;
/*case MK_TOKEN_VARIABLE:
Expand Down
2 changes: 1 addition & 1 deletion src/mk-scanner.l
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ mkp_scanner_parse_variable (MkpScanner *scanner, AnjutaToken *variable)

if (token != NULL)
{
anjuta_token_set_type (variable, ANJUTA_TOKEN_VARIABLE);
anjuta_token_set_type (variable, ANJUTA_TOKEN_MACRO);
token = anjuta_token_copy (token);
anjuta_token_insert_after (variable, token);

Expand Down
8 changes: 7 additions & 1 deletion tests/makefile.lst
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
VARIABLE: CFLAGS = -g -Wall
VARIABLE: OBJECTS = foobar.o
VARIABLE: LDFLAGS = -Wl,-rpath,/usr/local/lib
VARIABLE: CC = gcc
VARIABLE: LIBS = (null)
VARIABLE: INCFLAGS = (null)
GROUP (0): makefile
TARGET (0:0): foorbar
TARGET (0:0): foobar
SOURCE (0:0:0): foobar.c

0 comments on commit 2ba01da

Please sign in to comment.