Skip to content

Commit

Permalink
scdoc: fix string comparison in parser
Browse files Browse the repository at this point in the history
Signed-off-by: Tim Blechmann <tim@klingt.org>
  • Loading branch information
timblechmann committed Aug 15, 2012
1 parent 8664d1d commit 52c7466
Show file tree
Hide file tree
Showing 3 changed files with 827 additions and 753 deletions.
Loading

3 comments on commit 52c7466

@lijon
Copy link
Member

@lijon lijon commented on 52c7466 Aug 15, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be better to use string constants (like symbols) to avoid using strcmp()

@timblechmann
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, but where does method_type come from? is it set explicitly or is it taken from the parsed data?

@lijon
Copy link
Member

@lijon lijon commented on 52c7466 Aug 18, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's always set to string literals, example:

sectiontag: CLASSMETHODS { $$ = "CLASSMETHODS"; method_type = "CMETHOD"; }

Just do a find in SCDoc.y and you'll see them all.

Please sign in to comment.