[COMPILER]
* NEW: The ".[xxx]" syntax now can be used inside a WITH <object> ... END WITH control structure. It is a synonymous for "<object>[xxx]". git-svn-id: svn://localhost/gambas/trunk@5797 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
parent
f2f2b99cc4
commit
f318c2ba39
2 changed files with 11 additions and 4 deletions
|
@ -170,7 +170,7 @@ void TRANS_class(int index)
|
|||
}
|
||||
}
|
||||
|
||||
static void trans_identifier(int index, bool first, bool point, PATTERN next)
|
||||
static void trans_identifier(int index, bool point, PATTERN next)
|
||||
{
|
||||
CLASS_SYMBOL *sym = CLASS_get_symbol(JOB->class, index);
|
||||
bool is_static;
|
||||
|
@ -356,7 +356,7 @@ static void trans_expr_from_tree(TRANS_TREE *tree, int count)
|
|||
push_string(PATTERN_index(pattern), TRUE);
|
||||
|
||||
else if (PATTERN_is_identifier(pattern))
|
||||
trans_identifier(PATTERN_index(pattern), PATTERN_is_first(pattern), PATTERN_is_point(pattern), next_pattern);
|
||||
trans_identifier(PATTERN_index(pattern), PATTERN_is_point(pattern), next_pattern);
|
||||
|
||||
else if (PATTERN_is_class(pattern))
|
||||
TRANS_class(PATTERN_index(pattern));
|
||||
|
|
|
@ -40,9 +40,9 @@ static short level;
|
|||
static PATTERN *current;
|
||||
static TRANS_TREE tree[MAX_EXPR_PATTERN];
|
||||
static int tree_length = 0;
|
||||
/*static PATTERN last_pattern;*/
|
||||
|
||||
static void analyze_expr(short priority, short op_main);
|
||||
static void analyze_array();
|
||||
|
||||
|
||||
static void inc_level()
|
||||
|
@ -338,7 +338,7 @@ static void analyze_single(int op)
|
|||
add_operator(PATTERN_index(*pattern), 1);
|
||||
}
|
||||
|
||||
/* . symbol */
|
||||
/* . symbol | . [] */
|
||||
|
||||
else if (PATTERN_is(*current, RS_PT) && PATTERN_is_identifier(current[1]))
|
||||
{
|
||||
|
@ -346,6 +346,13 @@ static void analyze_single(int op)
|
|||
add_pattern(PATTERN_set_flag(current[1], RT_POINT));
|
||||
current += 2;
|
||||
}
|
||||
else if (PATTERN_is(*current, RS_PT) && PATTERN_is(current[1], RS_LSQR))
|
||||
{
|
||||
add_operator(PATTERN_index(current[0]), 0);
|
||||
//add_pattern(PATTERN_set_flag(RS_RSQR, RT_POINT));
|
||||
current += 2;
|
||||
analyze_array();
|
||||
}
|
||||
|
||||
/* NULL, TRUE, FALSE, ME, PARENT, LAST, ERROR */
|
||||
/* number, string or symbol */
|
||||
|
|
Loading…
Reference in a new issue