diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml new file mode 100644 index 0000000..59a57e6 --- /dev/null +++ b/.github/workflows/windows.yml @@ -0,0 +1,14 @@ +on: push +jobs: + build: + runs-on: windows-latest + steps: + - uses: msys2/setup-msys2@v2 + with: + msystem: msys + install: gcc make + - uses: actions/checkout@v4 + - shell: msys2 {0} + run: | + ./configure + make all check bootstrap diff --git a/configure b/configure index 0d94402..3fbb863 100755 --- a/configure +++ b/configure @@ -122,7 +122,7 @@ case "$target" in endfiles='"-l", "c", "-l", ":crtn.o"' defines='"-D", "__builtin_stdarg_start(ap, last)=__builtin_va_start(ap, last)"' ;; -*-*msys*) +*-msys*) startfiles='"-l", ":crt0.o"' endfiles='"-l", "c", "-l", "msys-2.0", "-l", "kernel32"' ;; diff --git a/pp.c b/pp.c index 09d1a06..b24acf5 100644 --- a/pp.c +++ b/pp.c @@ -636,6 +636,7 @@ next(void) tok = *t; if (tok.kind == TIDENT) keyword(&tok); + fprintf(stderr, "token=%d %s %s\n", tok.kind, tokstr[t->kind], tok.lit); } bool diff --git a/scan.c b/scan.c index 0e6e7b1..b2008c7 100644 --- a/scan.c +++ b/scan.c @@ -126,6 +126,7 @@ ident(struct scanner *s) s->usebuf = true; while (isalnum(s->chr) || s->chr == '_') nextchar(s); + fprintf(stderr, "ident='%.*s'\n", (int)s->buf.len, s->buf.str); return TIDENT; }