X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=src%2Fcc65%2Fstmt.h;h=0a504a0ba27a49a8819f176181ac7ce90f2eacbf;hb=923ae328a53d95390815c73b390165e85c06af01;hp=70bfa99e3f3ad51859473c6bdf36ad12f9381e4b;hpb=53dd513176425872128ef26031d00952ef7a0628;p=cc65 diff --git a/src/cc65/stmt.h b/src/cc65/stmt.h index 70bfa99e3..0a504a0ba 100644 --- a/src/cc65/stmt.h +++ b/src/cc65/stmt.h @@ -1,8 +1,35 @@ -/* - * stmt.h - * - * Ullrich von Bassewitz, 19.06.1998 - */ +/*****************************************************************************/ +/* */ +/* stmt.h */ +/* */ +/* Parse a statement */ +/* */ +/* */ +/* */ +/* (C) 1998-2001 Ullrich von Bassewitz */ +/* Wacholderweg 14 */ +/* D-70597 Stuttgart */ +/* EMail: uz@cc65.org */ +/* */ +/* */ +/* This software is provided 'as-is', without any expressed or implied */ +/* warranty. In no event will the authors be held liable for any damages */ +/* arising from the use of this software. */ +/* */ +/* Permission is granted to anyone to use this software for any purpose, */ +/* including commercial applications, and to alter it and redistribute it */ +/* freely, subject to the following restrictions: */ +/* */ +/* 1. The origin of this software must not be misrepresented; you must not */ +/* claim that you wrote the original software. If you use this software */ +/* in a product, an acknowledgment in the product documentation would be */ +/* appreciated but is not required. */ +/* 2. Altered source versions must be plainly marked as such, and must not */ +/* be misrepresented as being the original software. */ +/* 3. This notice may not be removed or altered from any source */ +/* distribution. */ +/* */ +/*****************************************************************************/ @@ -17,8 +44,15 @@ -int compound (); -/* Compound statement. Allow any number of statements, inside braces. */ +int Statement (int* PendingToken); +/* Statement parser. Returns 1 if the statement does a return/break, returns + * 0 otherwise. If the PendingToken pointer is not NULL, the function will + * not skip the terminating token of the statement (closing brace or + * semicolon), but store true if there is a pending token, and false if there + * is none. The token is always checked, so there is no need for the caller to + * check this token, it must be skipped, however. If the argument pointer is + * NULL, the function will skip the token. + */