trainerproc: Parse line markers (#5122)
This commit is contained in:
parent
6bbc0601a9
commit
a5e0738484
3 changed files with 17026 additions and 17015 deletions
2
Makefile
2
Makefile
|
@ -346,7 +346,7 @@ sound/%.bin: sound/%.aif ; $(AIF) $< $@
|
||||||
|
|
||||||
COMPETITIVE_PARTY_SYNTAX := $(shell PATH="$(PATH)"; echo 'COMPETITIVE_PARTY_SYNTAX' | $(CPP) $(CPPFLAGS) -imacros include/global.h | tail -n1)
|
COMPETITIVE_PARTY_SYNTAX := $(shell PATH="$(PATH)"; echo 'COMPETITIVE_PARTY_SYNTAX' | $(CPP) $(CPPFLAGS) -imacros include/global.h | tail -n1)
|
||||||
ifeq ($(COMPETITIVE_PARTY_SYNTAX),1)
|
ifeq ($(COMPETITIVE_PARTY_SYNTAX),1)
|
||||||
%.h: %.party tools ; $(CPP) $(CPPFLAGS) -traditional-cpp - < $< | sed '/#[^p]/d' | $(TRAINERPROC) -o $@ -i $< -
|
%.h: %.party tools ; $(CPP) $(CPPFLAGS) -traditional-cpp - < $< | $(TRAINERPROC) -o $@ -i $< -
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(MODERN),0)
|
ifeq ($(MODERN),0)
|
||||||
|
|
34016
src/data/trainers.h
34016
src/data/trainers.h
File diff suppressed because it is too large
Load diff
|
@ -425,12 +425,6 @@ static bool match_eol(struct Parser *p)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
__attribute__((warn_unused_result))
|
|
||||||
static bool match_empty_line(struct Parser *p)
|
|
||||||
{
|
|
||||||
return match_eol(p);
|
|
||||||
}
|
|
||||||
|
|
||||||
__attribute__((warn_unused_result))
|
__attribute__((warn_unused_result))
|
||||||
static bool match_int(struct Parser *p, int *i)
|
static bool match_int(struct Parser *p, int *i)
|
||||||
{
|
{
|
||||||
|
@ -457,6 +451,23 @@ static bool match_int(struct Parser *p, int *i)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
__attribute__((warn_unused_result))
|
||||||
|
static bool match_empty_line(struct Parser *p)
|
||||||
|
{
|
||||||
|
struct Parser p_ = *p;
|
||||||
|
if (match_exact(&p_, "# ")) {
|
||||||
|
int line;
|
||||||
|
if (match_int(&p_, &line)) {
|
||||||
|
struct Token t;
|
||||||
|
match_until_eol(&p_, &t);
|
||||||
|
p_.location.line = line - 1;
|
||||||
|
*p = p_;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return match_eol(p);
|
||||||
|
}
|
||||||
|
|
||||||
__attribute__((warn_unused_result))
|
__attribute__((warn_unused_result))
|
||||||
static bool match_identifier(struct Parser *p, struct Token *t)
|
static bool match_identifier(struct Parser *p, struct Token *t)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue