mirror of
https://github.com/netwide-assembler/nasm.git
synced 2024-11-21 03:14:19 +08:00
asm/nasm.c: Move directive parsing into a separate function
Move the directive parsing out of the main loop into a separate function. It is much cleaner this way, and opens up for further refactoring -- a bunch of the directives do the same thing or very similar things. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
This commit is contained in:
parent
f786ef7371
commit
c713168bc7
@ -45,7 +45,10 @@ require 'phash.ph';
|
||||
my($output, $directives_dat, $outfile) = @ARGV;
|
||||
|
||||
@directives = ();
|
||||
@specials = ('none', 'unknown');
|
||||
|
||||
# Special values for enum directives. Note that D_none must be first
|
||||
# so D_none == 0.
|
||||
@specials = ('none', 'unknown', 'corrupt');
|
||||
|
||||
open(DD, "< ${directives_dat}\0")
|
||||
or die "$0: cannot open: ${directives_dat}: $!\n";
|
||||
|
1151
asm/nasm.c
1151
asm/nasm.c
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user