[Pas2js] Pas2js 1.2.0RC1

Mattias Gaertner nc-gaertnma at netcologne.de
Tue Dec 18 00:49:32 CET 2018


> warleyalex via Pas2js <pas2js at lists.freepascal.org> hat am 17. Dezember 2018 um 20:16 geschrieben:
>[...]
> I saw the sudden cloud of blue smoke from the pas2js - someone has
> implemented the anonymous functions. I just can not believe, it worked! 

That sounds as if you like them.
  
> It's so boring writing sub functions in pas2js :( to do simple things. 

That sounds as if you hate them.
 
> Note:
> I uploaded the 1st release of Pas2js 1.2.0RC1 to test anonymous functions.
> [...]
> ii) I have to add manually "pas2js_rtl" as Required Packages to compile the
> project as expected.

What lazarus version?
Lazarus 2.0 does not need the package. A pas2js.cfg is enough.
The package is needed by 1.8.x.

>[...]
> iii) the required pas2js_rtl package does not compile out the box.
> I had to edit the file node.js and comment some lines at the initialization
> section:

nodejs.pas only compiles under target nodejs.

 
>[...]
> a) "fcl_base_pas2js.lpk", it displays:
> Package fcl_base_pas2js 1.0: Executing command before: Exit code 4, Errors:
> 5
> Panic: Pas2JS Compiler version 1.2.0RC1 [2018/12/16] for Win32 i386
> Panic: Copyright (c) 2018 Free Pascal team.
> Panic: Fatal: (110) source file not found
> "D:\fpc2js\pas2js-windows-1.2.0RC1\packages\fcl-db\System.p"

Please post the command line parameters passed to pas2js. For example right click on message / About Compile package ...

>[...]
> iv) Code insight / code completion does not work with annonymous functions.
> We use the keyword procedure without ";" to indicate annonymous functions
> but the Lazarus code completion does undestand that.

Only Lazarus trunk understands anonymous functions. I fixed one such bug today.

>[...]

Mattias


More information about the Pas2js mailing list