Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
micropython
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
card10
micropython
Commits
00208ce1
Commit
00208ce1
authored
11 years ago
by
Damien George
Browse files
Options
Downloads
Patches
Plain Diff
py: Change macro var args in parser to be C99 compliant.
parent
0d028743
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
py/compile.c
+1
-1
1 addition, 1 deletion
py/compile.c
py/parse.c
+4
-4
4 additions, 4 deletions
py/parse.c
with
5 additions
and
5 deletions
py/compile.c
+
1
−
1
View file @
00208ce1
...
...
@@ -23,7 +23,7 @@
typedef
enum
{
PN_none
=
0
,
#define DEF_RULE(rule, comp, kind,
arg
...) PN_##rule,
#define DEF_RULE(rule, comp, kind, ...) PN_##rule,
#include
"grammar.h"
#undef DEF_RULE
PN_maximum_number_of
,
...
...
This diff is collapsed.
Click to expand it.
py/parse.c
+
4
−
4
View file @
00208ce1
...
...
@@ -40,7 +40,7 @@ typedef struct _rule_t {
enum
{
RULE_none
=
0
,
#define DEF_RULE(rule, comp, kind,
arg
...) RULE_##rule,
#define DEF_RULE(rule, comp, kind, ...) RULE_##rule,
#include
"grammar.h"
#undef DEF_RULE
RULE_maximum_number_of
,
...
...
@@ -56,9 +56,9 @@ enum {
#define opt_tok(t) (RULE_ARG_OPT_TOK | MP_TOKEN_##t)
#define opt_rule(r) (RULE_ARG_OPT_RULE | RULE_##r)
#ifdef USE_RULE_NAME
#define DEF_RULE(rule, comp, kind,
arg
...) static const rule_t rule_##rule = { RULE_##rule, kind, #rule, {
arg
} };
#define DEF_RULE(rule, comp, kind, ...) static const rule_t rule_##rule = { RULE_##rule, kind, #rule, {
__VA_ARGS__
} };
#else
#define DEF_RULE(rule, comp, kind,
arg
...) static const rule_t rule_##rule = { RULE_##rule, kind, {
arg
} };
#define DEF_RULE(rule, comp, kind, ...) static const rule_t rule_##rule = { RULE_##rule, kind, {
__VA_ARGS__
} };
#endif
#include
"grammar.h"
#undef or
...
...
@@ -74,7 +74,7 @@ enum {
static
const
rule_t
*
rules
[]
=
{
NULL
,
#define DEF_RULE(rule, comp, kind,
arg
...) &rule_##rule,
#define DEF_RULE(rule, comp, kind, ...) &rule_##rule,
#include
"grammar.h"
#undef DEF_RULE
};
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment