Skip to content

Instantly share code, notes, and snippets.

@ugexe
Created April 6, 2015 23:26
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save ugexe/471a878e3b85be9d2446 to your computer and use it in GitHub Desktop.
Stage parse : Error while compiling, type X::Syntax::Malformed
what: parameter
line: 26319
modules: ()
pre: $out = self.precomp-path,
post: ->
highexpect: (formal parameter)
is-compile-time: 1
filename: src/gen/m-CORE.setting
at line 26320, near "->\n :"
@ugexe
Copy link
Author

ugexe commented Apr 6, 2015

source (before build)

method precomp(CompUnit:D:
  $out  = self.precomp-path, ->
  :$INC = @*INC,
  :$force,
  --> Bool) {
    die "Cannot pre-compile over an existing file: $out"
      if !$force and $out.IO.e;
    my Mu $opts := nqp::atkey(%*COMPILING, '%?OPTIONS');
    my $lle = !nqp::isnull($opts) && !nqp::isnull(nqp::atkey($opts, 'll-exception'))
      ?? ' --ll-exception'
      !! '';
    %*ENV<RAKUDO_PRECOMP_WITH> = CREATE-INCLUDE-SPEC(@$INC);
    my Bool $result = ?shell(
      "$*EXECUTABLE$lle --target={$*VM.precomp-target} --output=$out $!path"
    );
    %*ENV<RAKUDO_PRECOMP_WITH>:delete;

    $!has-precomp = $result if $out eq self.precomp-path;
    $result;
}

@ugexe
Copy link
Author

ugexe commented Apr 6, 2015

m-CORE.setting

method precomp(CompUnit:D:
  $out  = self.precomp-path, ->
  :$INC = @*INC,
  :$force,
  --> Bool) {
    die "Cannot pre-compile over an existing file: $out"
      if !$force and $out.IO.e;
    my Mu $opts := nqp::atkey(%*COMPILING, '%?OPTIONS');
    my $lle = !nqp::isnull($opts) && !nqp::isnull(nqp::atkey($opts, 'll-exception'))
      ?? ' --ll-exception'
      !! '';
    %*ENV<RAKUDO_PRECOMP_WITH> = CREATE-INCLUDE-SPEC(@$INC);
    my Bool $result = ?shell(
      "$*EXECUTABLE$lle --target={$*VM.precomp-target} --output=$out $!path"
    );
    %*ENV<RAKUDO_PRECOMP_WITH>:delete;

    $!has-precomp = $result if $out eq self.precomp-path;
    $result;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment