removed the option HCL_TRAIT_LANG_ENABLE_BLOCK, thus removing conditional codes for simplicity.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
changed the compiler to require a block expression as the class body
This commit is contained in:
10
bin/hcl.c
10
bin/hcl.c
@ -722,7 +722,7 @@ int main (int argc, char* argv[])
|
||||
};
|
||||
static hcl_bopt_t opt =
|
||||
{
|
||||
"l:bnv",
|
||||
"l:nv",
|
||||
lopt
|
||||
};
|
||||
|
||||
@ -730,7 +730,6 @@ int main (int argc, char* argv[])
|
||||
hcl_oow_t heapsize = DEFAULT_HEAPSIZE;
|
||||
int verbose = 0;
|
||||
int show_info = 0;
|
||||
int enable_block = 0;
|
||||
int nl_terminator = 0;
|
||||
const char* modlibdirs = HCL_NULL;
|
||||
|
||||
@ -746,7 +745,6 @@ int main (int argc, char* argv[])
|
||||
print_usage:
|
||||
fprintf (stderr, "Usage: %s [options] script-filename [output-filename]\n", argv[0]);
|
||||
fprintf (stderr, "Options are:\n");
|
||||
fprintf (stderr, " -b enable block construct with {}\n");
|
||||
fprintf (stderr, " -n enable line-break as expression terminator\n");
|
||||
return -1;
|
||||
}
|
||||
@ -759,10 +757,6 @@ int main (int argc, char* argv[])
|
||||
logopt = opt.arg;
|
||||
break;
|
||||
|
||||
case 'b':
|
||||
enable_block = 1;
|
||||
break;
|
||||
|
||||
case 'n':
|
||||
nl_terminator = 1;
|
||||
break;
|
||||
@ -838,10 +832,8 @@ int main (int argc, char* argv[])
|
||||
/*trait |= HCL_TRAIT_NOGC;*/
|
||||
trait |= HCL_TRAIT_AWAIT_PROCS;
|
||||
#if 0
|
||||
if (enable_block) trait |= HCL_TRAIT_LANG_ENABLE_BLOCK;
|
||||
if (nl_terminator) trait |= HCL_TRAIT_LANG_ENABLE_EOL;
|
||||
#else
|
||||
trait |= HCL_TRAIT_LANG_ENABLE_BLOCK;
|
||||
trait |= HCL_TRAIT_LANG_ENABLE_EOL;
|
||||
#endif
|
||||
hcl_setoption (hcl, HCL_TRAIT, &trait);
|
||||
|
Reference in New Issue
Block a user