mirror of
https://github.com/uffejakobsen/acme.git
synced 2025-04-05 01:30:08 +00:00
comments only
git-svn-id: https://svn.code.sf.net/p/acme-crossass/code-0/trunk@201 4df02467-bbd4-4a76-a152-e7ce94205b78
This commit is contained in:
parent
5bcb80ac47
commit
af4a918f18
@ -164,6 +164,7 @@ static int first_label_of_statement(int *statement_flags)
|
||||
|
||||
// parse label definition (can be either global or local).
|
||||
// name must be held in GlobalDynaBuf.
|
||||
// called by parse_symbol_definition, parse_backward_anon_def, parse_forward_anon_def
|
||||
static void set_label(scope_t scope, int stat_flags, int force_bit, boolean change_allowed)
|
||||
{
|
||||
struct number pc;
|
||||
@ -241,6 +242,7 @@ static void parse_local_symbol_def(int *statement_flags, scope_t scope)
|
||||
{
|
||||
if (!first_label_of_statement(statement_flags))
|
||||
return;
|
||||
|
||||
GetByte(); // start after '.'/'@'
|
||||
if (Input_read_keyword())
|
||||
parse_symbol_definition(scope, *statement_flags);
|
||||
|
@ -325,6 +325,7 @@ static char GetQuotedByte(void)
|
||||
}
|
||||
|
||||
// Skip remainder of statement, for example on error
|
||||
// FIXME - check for quotes, otherwise this might treat a quoted colon like EOS!
|
||||
void Input_skip_remainder(void)
|
||||
{
|
||||
while (GotByte)
|
||||
|
@ -888,14 +888,14 @@ static boolean check_ifdef_condition(void)
|
||||
symbol->usage++;
|
||||
return symbol->object.type->is_defined(&symbol->object);
|
||||
}
|
||||
// new if/ifdef/ifndef/else function, to be able to do ELSE IF
|
||||
// if/ifdef/ifndef/else function, to be able to do ELSE IF
|
||||
enum ifmode {
|
||||
IFMODE_IF, // parse expression, then block
|
||||
IFMODE_IFDEF, // check symbol, then parse block or line
|
||||
IFMODE_IFNDEF, // check symbol, then parse block or line
|
||||
IFMODE_ELSE // unconditional last block
|
||||
};
|
||||
// new function for if/ifdef/ifndef/else. has to be re-entrant.
|
||||
// function for if/ifdef/ifndef/else. has to be re-entrant.
|
||||
static enum eos ifelse(enum ifmode mode)
|
||||
{
|
||||
boolean nothing_done = TRUE; // once a block gets executed, this becomes FALSE, so all others will be skipped even if condition met
|
||||
|
17
src/symbol.c
17
src/symbol.c
@ -107,6 +107,23 @@ static void dump_vice_unusednonaddress(struct rwnode *node, FILE *fd)
|
||||
|
||||
// search for symbol. create if nonexistant. if created, give it flags "flags".
|
||||
// the symbol name must be held in GlobalDynaBuf.
|
||||
/*
|
||||
FIXME - to get lists/strings to work, this can no longer create an int by default!
|
||||
maybe get rid of "int flags" and use some "struct object *default" instead?
|
||||
called by;
|
||||
alu.c
|
||||
get_symbol_value
|
||||
global.c
|
||||
set_label implicit symbol definition (gets assigned pc)
|
||||
parse_symbol_definition explicit symbol definition
|
||||
macro.c
|
||||
Macro_parse_call early to build array of outer refs in case of call-by-ref
|
||||
Macro_parse_call later to lookup inner symbols in case of call-by-value
|
||||
pseudoopcodes.c
|
||||
symbol_define
|
||||
symbol_fix_forward_anon_name
|
||||
symbol.c
|
||||
*/
|
||||
struct symbol *symbol_find(scope_t scope, int flags)
|
||||
{
|
||||
struct rwnode *node;
|
||||
|
Loading…
x
Reference in New Issue
Block a user