28 |
29 |
30 |
31 |
32 |
33 | ├── .gitignore
├── License.md
├── README.md
├── bin
└── pas2js.cfg
├── compiler
├── packages
│ ├── DictHelper.pas
│ ├── FPCTypes.pas
│ ├── avl_tree.pas
│ ├── delphi_defines.inc
│ ├── fcl-js
│ │ ├── README.TXT
│ │ └── src
│ │ │ ├── fcl-js.inc
│ │ │ ├── jsbase.pas
│ │ │ ├── jssrcmap.pas
│ │ │ ├── jstoken.pas
│ │ │ ├── jstree.pas
│ │ │ └── jswriter.pas
│ ├── fcl-json
│ │ └── src
│ │ │ ├── README.txt
│ │ │ ├── fcl-json.inc
│ │ │ ├── fpjson.pas
│ │ │ ├── jsonparser.pas
│ │ │ ├── jsonreader.pas
│ │ │ └── jsonscanner.pas
│ ├── fcl-passrc
│ │ └── src
│ │ │ ├── PParser.pas
│ │ │ ├── PasResolver.pas
│ │ │ ├── fcl-passrc.inc
│ │ │ ├── pasresolveeval.pas
│ │ │ ├── pastree.pas
│ │ │ ├── pasuseanalyzer.pas
│ │ │ └── pscanner.pas
│ ├── pastojs
│ │ └── src
│ │ │ ├── FPPas2Js.pas
│ │ │ ├── Pas2JSFSCompiler.pas
│ │ │ ├── Pas2jsCompiler.pas
│ │ │ ├── Pas2jsFileCache.pas
│ │ │ ├── Pas2jsLogger.pas
│ │ │ ├── Pas2jsPParser.pas
│ │ │ ├── fppjssrcmap.pas
│ │ │ ├── pas2js_defines.inc
│ │ │ ├── pas2jscompilercfg.pas
│ │ │ ├── pas2jscompilerpp.pas
│ │ │ ├── pas2jsfileutils.pas
│ │ │ ├── pas2jsfileutilsnodejs.inc
│ │ │ ├── pas2jsfileutilsunix.inc
│ │ │ ├── pas2jsfileutilswin.inc
│ │ │ ├── pas2jsfs.pas
│ │ │ ├── pas2jshtmlresources.pas
│ │ │ ├── pas2jsjsresources.pas
│ │ │ ├── pas2jsresources.pas
│ │ │ ├── pas2jsresstrfile.pas
│ │ │ ├── pas2jsuseanalyzer.pas
│ │ │ └── pas2jsutils.pas
│ ├── pipes.inc
│ ├── pipes.pas
│ ├── process.inc
│ └── process.pas
└── utils
│ └── pas2js
│ ├── dist
│ └── rtl.js
│ ├── docs
│ └── translation.html
│ ├── pas2js.cfg
│ ├── pas2js.dpr
│ ├── pas2js.dproj
│ ├── pas2js.res
│ ├── pas2jswebcompiler.pp
│ └── webfilecache.pp
├── demo
├── apiclient
│ ├── apiclient.lpr
│ ├── bulma.min.css
│ └── index.html
├── asyncawait
│ ├── asyncawaitdemos.lpg
│ ├── description.txt
│ ├── fpc.png
│ ├── manualpromise.html
│ ├── manualpromise.lpr
│ ├── pas2js.png
│ ├── tryfetch.html
│ ├── tryfetch.lpr
│ ├── trymany.html
│ └── trymany.lpr
├── atom
│ ├── .gitignore
│ ├── README.md
│ ├── demoview.pas
│ ├── keymaps
│ │ └── pas2jsdemopackage.json
│ ├── lib
│ │ └── packageglue.js
│ ├── menus
│ │ └── pas2jsdemopackage.json
│ ├── package.json
│ ├── pas2jsdemopackage.lpr
│ ├── screenshot
│ │ ├── atom1.png
│ │ └── atom2.png
│ └── styles
│ │ └── pas2jsdemopackage.less
├── bootstrap
│ ├── bootstraptable.html
│ ├── countries.json
│ └── demobootstraptable.lpr
├── chartjs
│ ├── chartjs_demos.lpg
│ ├── demoarea.html
│ ├── demoarea.lpr
│ ├── demobar.html
│ ├── demobar.lpr
│ ├── demobubble.html
│ ├── demobubble.lpr
│ ├── democustompoints.html
│ ├── democustompoints.lpr
│ ├── demodatalabelling.html
│ ├── demodatalabelling.lpr
│ ├── demodate.html
│ ├── demodate.lpr
│ ├── demodoughnut.html
│ ├── demodoughnut.lpr
│ ├── demointeractions.html
│ ├── demointeractions.lpr
│ ├── demoline.html
│ ├── demoline.lpr
│ ├── demomixed.html
│ ├── demomixed.lpr
│ ├── demopie.html
│ ├── demopie.lpr
│ ├── demopolararea.html
│ ├── demopolararea.lpr
│ ├── demoprogressbar.html
│ ├── demoprogressbar.lpr
│ ├── demoradar.html
│ ├── demoradar.lpr
│ ├── demoscatter.html
│ ├── demoscatter.lpr
│ ├── demoscriptablebubble.html
│ ├── demoscriptablebubble.lpr
│ ├── demotime.html
│ ├── demotime.lpr
│ └── index.html
├── dataabstract
│ ├── DataAbstract.js
│ ├── DataAbstract4_intf.js
│ ├── README.txt
│ ├── RemObjectsSDK.js
│ ├── sampleda.html
│ ├── sampleda.lpr
│ ├── sampledarw.html
│ ├── sampledarw.lpr
│ └── server
│ │ ├── DALibrary.RODL
│ │ ├── DAServer.dpr
│ │ ├── DAServer.dproj
│ │ ├── DAServer.res
│ │ ├── DAServer_Intf.pas
│ │ ├── DAServer_Invk.pas
│ │ ├── DataService_Impl.dfm
│ │ ├── DataService_Impl.pas
│ │ ├── Modules.Server.dfm
│ │ ├── Modules.Server.pas
│ │ ├── RODLFILE.res
│ │ └── country.sql
├── dynload
│ ├── FormFactory.pas
│ ├── MyFormDep.pas
│ ├── myform.pp
│ ├── myformdep2.pp
│ ├── testloader.html
│ └── testloader.lpr
├── errorhandler
│ ├── errordemo.lpr
│ └── index.html
├── extend_jsclass
│ ├── ExtendJSFunctionClass1.html
│ └── ExtendJSFunctionClass1.lpr
├── fcldb
│ ├── countries-1.json
│ ├── countries-2.json
│ ├── countries-3.json
│ ├── countries.json
│ ├── demodb.html
│ ├── demodb.lpr
│ ├── demoload.html
│ ├── demoload.lpr
│ ├── demorest.html
│ ├── demorest.lpr
│ ├── restdata.pp
│ └── restserver.pas
├── fpcunit
│ ├── browsertest.cfg
│ ├── browsertest.html
│ ├── browsertest.lpr
│ ├── demotests.pp
│ ├── fpcunit.css
│ └── frmrunform.pp
├── fpreport
│ ├── README.md
│ ├── bootstrap.min.css
│ ├── frmmain.pp
│ ├── reportdemo.html
│ └── reportdemo.lpr
├── fullcalendar
│ ├── demofullcalendar.lpr
│ ├── demofullcalendar4.html
│ ├── demofullcalendar4.lpr
│ ├── demofullcalendar5.html
│ ├── demofullcalendar5.lpr
│ └── index.html
├── hotreload
│ ├── dirwatch.pp
│ ├── hotreload.cfg
│ ├── hotreload.html
│ ├── hotreload.lpr
│ ├── server.lpr
│ └── status.json
├── jitsimeet
│ ├── demojitsimeet.lpr
│ └── index.html
├── jquery
│ ├── demoadd.html
│ ├── demoadd.pas
│ ├── demoaddclass.html
│ ├── demoaddclass.pas
│ ├── demoaddclass2.html
│ └── demoaddclass2.pas
├── jspdf
│ ├── basic.html
│ └── basic.lpr
├── kurento
│ ├── css
│ │ └── kurento.css
│ ├── helloworld.html
│ ├── helloworld.lpr
│ ├── img
│ │ ├── kurento.png
│ │ ├── spinner.gif
│ │ └── webrtc.png
│ └── js
│ │ ├── kurento-client.js
│ │ └── kurento-utils.js
├── modules
│ ├── README.md
│ ├── basic-units
│ │ ├── canvas.pp
│ │ ├── index.html
│ │ ├── main.pp
│ │ └── square.pp
│ ├── basic
│ │ ├── index.html
│ │ └── main.pp
│ ├── flat-units
│ │ ├── canvas.pp
│ │ ├── index.html
│ │ ├── main.pp
│ │ └── square.pp
│ └── flat
│ │ ├── index.html
│ │ └── main.pp
├── nodehttpserver
│ └── nodehttpdemo.lpr
├── opentok
│ ├── css
│ │ └── app.css
│ ├── demoopentok.lpr
│ └── index.html
├── pacman
│ ├── audio
│ │ ├── die.mp3
│ │ ├── eatghost.mp3
│ │ ├── eating.mp3
│ │ └── start.mp3
│ ├── cherry.png
│ ├── ghost-scared.png
│ ├── ghost1.png
│ ├── ghost2.png
│ ├── ghost3.png
│ ├── ghost4.png
│ ├── pacman.css
│ ├── pacman.html
│ ├── pacman.lpr
│ └── upacman.pp
├── pas2js_demos.lpg
├── player
│ ├── headset.jpeg
│ ├── index.html
│ ├── main.pas
│ ├── style.css
│ └── tracks.js
├── promise
│ ├── askmom.html
│ ├── askmom.pas
│ ├── chapter-1.json
│ ├── chapter-2.json
│ ├── chapter-3.json
│ ├── chapter-4.json
│ ├── chapter-5.json
│ ├── demoall.html
│ ├── demoall.lpr
│ ├── promise_demos.lpg
│ ├── readme.md
│ ├── story.html
│ ├── story.json
│ ├── story.lpr
│ ├── story2.html
│ ├── story2.lpr
│ ├── story3.html
│ ├── story3.lpr
│ ├── styles.css
│ └── utils.pp
├── pushjs
│ ├── helloworld.html
│ └── helloworld.lpr
├── resources
│ ├── consoledemo.lpr
│ ├── css
│ │ ├── stylejs.css
│ │ └── stylelink.css
│ ├── down.png
│ ├── help.txt
│ ├── htmldemo.html
│ ├── htmldemo.lpr
│ ├── htmllinkdemo.html
│ ├── htmllinkdemo.lpr
│ ├── htmlloadlinkdemo.html
│ ├── htmlloadlinkdemo.lpr
│ ├── left.png
│ ├── resourcedemos.lpg
│ ├── right.png
│ ├── testa.html
│ ├── testb.html
│ ├── testres.html
│ ├── unita.pp
│ ├── unitb.pp
│ └── up.png
├── restbridge
│ └── simple
│ │ ├── README.txt
│ │ ├── restbridge.html
│ │ └── restbridgeclient.lpr
├── router
│ ├── README.md
│ ├── demorouter.html
│ ├── demorouter.pas
│ ├── demorouter2.html
│ ├── demorouter2.pas
│ ├── frmdemo.pp
│ ├── histsrv.js
│ └── histsrv2.js
├── rtl
│ ├── README.md
│ ├── ajax.pas
│ ├── bytes.txt
│ ├── countries.json
│ ├── demo_njsprocess.pas
│ ├── demoajax.html
│ ├── demoajax.lpr
│ ├── demobrowserconsole.html
│ ├── demobrowserconsole.lpr
│ ├── democanvas2d.html
│ ├── democanvas2d.pas
│ ├── democlasstopas.html
│ ├── democlasstopas.pas
│ ├── democollection.html
│ ├── democollection.pas
│ ├── democomponents.html
│ ├── democomponents.lpr
│ ├── demodatetime.pas
│ ├── demodocument1.html
│ ├── demodocument1.pas
│ ├── demodombuttonevent.html
│ ├── demodombuttonevent.pas
│ ├── demojsarray.pas
│ ├── demojsdataarray.pas
│ ├── demojsregexp.pas
│ ├── demojsstring.pas
│ ├── demoloadstreamfromurl.html
│ ├── demoloadstreamfromurl.lpr
│ ├── demoloadstringsfromurl.html
│ ├── demoloadstringsfromurl.lpr
│ ├── demonew.html
│ ├── demonew.pas
│ ├── demonodecmdlineoptions.pas
│ ├── demorouter.pas
│ ├── demortti.pas
│ ├── demostringlist.html
│ ├── demostringlist.pas
│ ├── demouncaughtexception.html
│ ├── demouncaughtexception.pas
│ ├── demoxhr.html
│ ├── demoxhr.lpr
│ └── rtl_demos.lpg
├── templates
│ ├── favicon.ico
│ ├── index.html
│ ├── templates.lpr
│ └── templates
│ │ ├── this.txt
│ │ └── thistoo.txt
├── tetris
│ ├── tetris.css
│ ├── tetris.html
│ ├── tetris.lpr
│ ├── tetrislogo.png
│ └── utetris.pp
├── translate
│ ├── dutch.json
│ ├── mystrings.pp
│ ├── translate_basic.html
│ ├── translate_basic.lpr
│ ├── translate_demos.lpg
│ ├── translate_object.html
│ ├── translate_object.lpr
│ ├── translate_url.html
│ └── translate_url.lpr
├── ts2pas
│ ├── bulma.min.css
│ ├── convert.lpr
│ └── index.html
├── uselibpas2js
│ ├── Readme.txt
│ ├── examples
│ │ └── TestUnitAlias1.pas
│ ├── libpas2jsintf.pas
│ ├── pas2js_unitalias.lpr
│ └── pas2jscompilerproxy.pas
├── vscode
│ └── helloworld
│ │ ├── .vscode
│ │ ├── launch.json
│ │ └── tasks.json
│ │ ├── README.md
│ │ ├── js
│ │ └── packageglue.js
│ │ ├── package.json
│ │ └── pas2jsdemoextension.lpr
├── wasienv
│ ├── canvas
│ │ ├── .gitignore
│ │ ├── bulma.min.css
│ │ ├── canvasdraw.lpr
│ │ ├── demowasicanvas.lpr
│ │ ├── index.html
│ │ ├── wacanvas.pp
│ │ └── webcanvas.pp
│ ├── simple
│ │ ├── bulma.min.css
│ │ ├── demowasienv.lpr
│ │ ├── helloworld.pp
│ │ └── index.html
│ ├── terminal
│ │ ├── bulma.min.css
│ │ ├── demowasiterm.lpr
│ │ ├── index.html
│ │ └── sums.pp
│ ├── wasiapp
│ │ ├── bulma.min.css
│ │ ├── demowasiapp.lpr
│ │ └── index.html
│ └── wasienvdemos.lpg
├── webcompiler
│ ├── demowebcompiler.lpr
│ ├── run.html
│ └── webcompiler.html
├── webgl
│ ├── GLTypes.pas
│ ├── GLUtils.pas
│ ├── Mat4.pas
│ ├── Matrix.pas
│ ├── MemoryBuffer.pas
│ ├── Noise.pas
│ ├── Pas2JS_WebGL.pas
│ ├── Pas2JS_WebGL_Minimal.pas
│ ├── Pas2JS_WebGL_OBJ.pas
│ ├── Pas2JS_WebGL_Terrain.pas
│ ├── README.txt
│ ├── Terrain.pas
│ ├── html
│ │ ├── Pas2JS_WebGL.html
│ │ ├── Pas2JS_WebGL_Minimal.html
│ │ ├── Pas2JS_WebGL_OBJ.html
│ │ ├── Pas2JS_WebGL_Terrain.html
│ │ └── res
│ │ │ ├── cube.obj
│ │ │ ├── dragon.obj
│ │ │ ├── ground.jpg
│ │ │ └── spacestars.jpg
│ ├── project1.lpr
│ └── webgl_demos.lpg
├── websockets
│ ├── README.md
│ ├── demowebsocket.lpr
│ ├── guest.png
│ ├── index.html
│ ├── serverconfig.js
│ ├── style.css
│ └── you.png
├── webwidget
│ ├── designdemo
│ │ ├── design.css
│ │ ├── designdemo.html
│ │ ├── designdemo.lpr
│ │ ├── designer.pp
│ │ ├── webideclient.pp
│ │ └── widgets
│ │ │ ├── button.png
│ │ │ ├── checkbox.png
│ │ │ ├── container.png
│ │ │ ├── edit.png
│ │ │ ├── image.png
│ │ │ ├── jumbo.png
│ │ │ ├── memo.png
│ │ │ ├── radio.png
│ │ │ └── select.png
│ ├── nativedesign
│ │ ├── frmmain.lfm
│ │ ├── frmmain.pp
│ │ ├── globalcefapplication.pas
│ │ ├── initsubprocess.pas
│ │ ├── nativedesigner.ico
│ │ ├── nativedesigner.lpr
│ │ ├── nativedesigner.res
│ │ └── webideintf.pp
│ └── widgets
│ │ ├── countrycodes.js
│ │ ├── css
│ │ └── widgetsdemo.css
│ │ ├── demobootstrap.pp
│ │ ├── democonsts.pp
│ │ ├── demohtmlwidgets.pp
│ │ ├── frmdemo.pp
│ │ ├── images
│ │ └── freePascal.jpeg
│ │ ├── webwidgetsdemo.lpr
│ │ ├── widgetdemo.pp
│ │ └── widgetsdemo.html
└── xterm
│ ├── index.html
│ └── xtermdemo.lpr
├── packages
├── atom
│ ├── atomapp.pp
│ ├── atomexports.js
│ ├── atomimports.js
│ └── libatom.pp
├── bootstrap
│ ├── bootstrapwidgets.pp
│ ├── libbootstrap.pp
│ └── libbootstraptable.pp
├── chartjs
│ └── chartjs.pas
├── dataabstract
│ ├── da.pas
│ ├── dadataset.pas
│ ├── dasdk.pas
│ └── rosdk.pas
├── fcl-base
│ ├── browserapp.pas
│ ├── custapp.pas
│ ├── fcl_base_pas2js.lpk
│ ├── fcl_base_pas2js.pas
│ ├── fpexprpars.pas
│ ├── nodejsapp.pas
│ └── pascodegen.pp
├── fcl-db
│ ├── db.pas
│ ├── dbconst.pas
│ ├── extjsdataset.pas
│ ├── fieldmap.pp
│ ├── jsondataset.pas
│ ├── pas2js_fcldb.lpk
│ ├── pas2js_fcldb.pas
│ ├── restconnection.pas
│ └── sqldbrestdataset.pp
├── fcl-json
│ ├── fpjson.pp
│ └── fpjsonjs.pas
├── fcl-rpc
│ ├── fprpcclient.pp
│ └── fprpccodegen.pp
├── flatpickr
│ └── libflatpickr.pas
├── fpcunit
│ ├── browsertestrunner.pas
│ ├── consoletestrunner.pas
│ ├── fpcunit.css
│ ├── fpcunit.pas
│ ├── fpcunit_pas2js.lpk
│ ├── fpcunit_pas2js.pas
│ ├── fpcunitreport.pas
│ ├── htmltestreport.pp
│ ├── plaintestreport.pas
│ ├── testdecorator.pas
│ └── testregistry.pas
├── fullcalendar
│ ├── libfullcalendar4.pp
│ └── libfullcalendar5.pp
├── jitsimeet
│ └── libjitsimeet.pp
├── jspdf
│ └── jspdf.pas
├── kurento
│ └── libkurento.pp
├── nodejs
│ ├── node.fs.pas
│ ├── node.http.pas
│ ├── node.net.pas
│ ├── node.onoff.pas
│ ├── node.spidevice.pas
│ └── node.url.pas
├── opentok
│ └── libopentok.pas
├── pushjs
│ ├── pushjs.js
│ └── pushjs.pas
├── rtl
│ ├── README.txt
│ ├── Rtl.BrowserLoadHelper.pas
│ ├── Rtl.ScriptLoader.pas
│ ├── Rtl.TemplateLoader.pas
│ ├── Rtl.UnitLoader.pas
│ ├── arrayutils.pas
│ ├── browserconsole.pas
│ ├── class2pas.pas
│ ├── classes.pas
│ ├── contnrs.pas
│ ├── dateutils.pas
│ ├── generics.collections.pas
│ ├── generics.defaults.pas
│ ├── generics.strings.pas
│ ├── hotreloadclient.pas
│ ├── js.pas
│ ├── libjquery.pas
│ ├── math.pas
│ ├── node.events.pas
│ ├── nodejs.pas
│ ├── objpas.pas
│ ├── p2jsres.pp
│ ├── pas2js_rtl.lpk
│ ├── pas2js_rtl.pas
│ ├── rstranslate.pp
│ ├── rtlconsts.pas
│ ├── rtti.pas
│ ├── simplelinkedlist.pas
│ ├── strutils.pas
│ ├── system.pas
│ ├── sysutils.pas
│ ├── timer.pas
│ ├── types.pas
│ ├── typinfo.pas
│ ├── web.pas
│ ├── webassembly.pas
│ ├── webaudio.pas
│ ├── webbluetooth.pas
│ ├── webgl.pas
│ ├── webrouter.pp
│ ├── webrtc.pas
│ ├── websvg.pas
│ └── webutils.pas
├── vscode
│ ├── libvscode.pas
│ ├── vscodeapp.pp
│ ├── vscodeexports.js
│ └── vscodeimports.js
├── wasi
│ ├── wasienv.pas
│ └── wasihostapp.pas
├── webwidget
│ ├── dbhtmlwidgets.pp
│ ├── dbwebwidget.pp
│ ├── htmlwidgets.pp
│ ├── lazwebwidgets.lpk
│ ├── lazwebwidgets.pas
│ ├── propertygridwidget.pp
│ └── webwidget.pas
└── xterm
│ └── xterm.pp
└── test
├── frmrtlrun.pp
├── index.html
├── tcclasses.pas
├── tccompstreaming.pp
├── tcgenarrayhelper.pas
├── tcgenericdictionary.pp
├── tcgenericlist.pp
├── tcgenericqueue.pp
├── tcgenericstack.pp
├── tcstream.pp
├── tcstreaming.pp
├── tcstringhelp.pp
├── tcsyshelpers.pp
├── tcsysutils.pas
├── testcomps.pp
├── testrtl.lpr
└── tohelper.inc
/License.md:
--------------------------------------------------------------------------------
1 | # Pas2js for Delphi License Agreement
2 |
3 | This is the file COPYING.FPC, it applies to the Free Pascal Run-Time Library (RTL) and packages (packages) distributed by members of the Free Pascal Development Team.
4 |
5 | The source code of the Free Pascal Runtime Libraries and packages are distributed under the Library GNU General Public License (see the file COPYING) with the following modification:
6 |
7 | As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules,
8 | and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version.
9 |
--------------------------------------------------------------------------------
/bin/pas2js.cfg:
--------------------------------------------------------------------------------
1 | #
2 | # Config file for pas2js compiler
3 | #
4 | # -d is the same as #DEFINE
5 | # -u is the same as #UNDEF
6 | #
7 | # Write always a nice logo ;)
8 | -l
9 |
10 | # Display Warnings, Notes and Hints
11 | -vwnh
12 | # If you don't want so much verbosity use
13 | #-vw
14 |
15 | # Support operators like C (*=,+=,/= and -=)
16 | -Sc
17 |
18 | #IFDEF nodejs
19 | -Jirtl.js
20 | #ENDIF
21 |
22 | -Fu$CfgDir\..\packages\*
23 | -Fu$CfgDir\..\compiler\utils\pas2js\dist\
24 |
25 | # Put all generated JavaScript into one file
26 | #-Jc
27 |
28 | # end.
29 |
--------------------------------------------------------------------------------
/compiler/packages/delphi_defines.inc:
--------------------------------------------------------------------------------
1 | {$inline on}
2 |
3 | {$IFDEF Windows}
4 | {$define CaseInsensitiveFilenames}
5 | {$define HasUNCPaths}
6 | {$ENDIF}
7 | {$IFDEF darwin}
8 | {$define CaseInsensitiveFilenames}
9 | {$ENDIF}
10 | {$IF defined(CaseInsensitiveFilenames) or defined(darwin)}
11 | {$DEFINE NotLiteralFilenames} // e.g. HFS+ normalizes file names
12 | {$ENDIF}
13 |
14 | {$IFDEF FPC}
15 | {$DEFINE UsePChar}
16 | {$DEFINE HasInt64}
17 | {.$define UseAnsiStrings}
18 | {$DEFINE HasStreams}
19 | {.$DEFINE UTF8_RTL}
20 | {.$DEFINE HasStdErr}
21 | {$DEFINE HasPas2jsFiler}
22 | {$define HasJsonParser}
23 | {$ENDIF}
24 |
25 | {$IF DEFINED(FPC) OR DEFINED(NODEJS)}
26 | {$DEFINE HASFILESYSTEM}
27 | {$define HasFS}
28 | {$define HasFileWriter}
29 | {$ENDIF}
30 |
31 | {$IFDEF CPU32BITS}
32 | {$DEFINE CPU32}
33 | {$ENDIF}
34 |
35 | {$IFDEF CPU64BITS}
36 | {$DEFINE CPU64}
37 | {$ENDIF}
38 |
39 | {$WARN WIDECHAR_REDUCED OFF} // W1050 WideChar reduced to byte char in set expressions
40 |
41 | // As of XE5 and newer, this needs to be in each individual unit
42 | // for which you want to disable RTTI
43 | {$IFDEF UNICODE}
44 | {$WEAKLINKRTTI ON}
45 | {$IF DECLARED(TVisibilityClasses)}
46 | {$RTTI EXPLICIT METHODS([]) PROPERTIES([]) FIELDS([])}
47 | {$IFEND}
48 | {$ENDIF}
49 |
--------------------------------------------------------------------------------
/compiler/packages/fcl-js/README.TXT:
--------------------------------------------------------------------------------
1 | This is a package that contains a Javascript Scanner/parser/Syntax tree.
2 |
3 | The following units are defined:
4 |
5 | jsbase: the definition of Javascript values. Used to represent constant values.
6 | jstree: The Javascript syntax tree elements. Used in the parser to describe a source program
7 | jsscanner: the Javascript scanner. Currently not yet unicode-enabled.
8 | jsparser: the Javascript parser. Builds a complete javascript syntax tree.
9 |
10 | The tests directory contains a set of FPCUnit tests to test the scanner and parser.
11 | It needs Lazarus to run.
12 |
13 | Todo:
14 | - Add more tests.
15 | - Unicode support.
16 | - Runtime-engine ?
17 |
18 | The idea for the tree elements and the parser come from the Libsee library,
19 | written by David Leonard.
20 |
21 | Enjoy!
22 |
23 | Michael.
--------------------------------------------------------------------------------
/compiler/packages/fcl-js/src/fcl-js.inc:
--------------------------------------------------------------------------------
1 | {$mode objfpc}{$H+}
2 | {$if defined(fpc) or defined(NodeJS)}
3 | {$define HasFileWriter}
4 | {$endif}
5 |
6 | {$IF FPC_FULLVERSION>30100}
7 | {$warn 6058 off} // cannot inline
8 | {$ENDIF}
9 |
10 |
--------------------------------------------------------------------------------
/compiler/packages/fcl-json/src/fcl-json.inc:
--------------------------------------------------------------------------------
1 | {$mode objfpc}{$H+}
2 | {$if defined(fpc) or defined(NodeJS)}
3 | {$define HasFileWriter}
4 | {$endif}
5 |
6 | {$IF FPC_FULLVERSION>30100}
7 | {$warn 6058 off} // cannot inline
8 | {$ENDIF}
9 |
10 |
--------------------------------------------------------------------------------
/compiler/packages/fcl-passrc/src/fcl-passrc.inc:
--------------------------------------------------------------------------------
1 | {$mode objfpc}{$H+}
2 | {$inline on}
3 |
4 | {$ifdef fpc}
5 | {$define UsePChar}
6 | {$define HasInt64}
7 | {$define UsePChar}
8 | {$define UseAnsiStrings}
9 | {$define HasStreams}
10 | {$IF FPC_FULLVERSION<30101}
11 | {$define EmulateArrayInsert}
12 | {$endif}
13 | {$define HasFS}
14 | {$endif}
15 |
16 | {$IFDEF NODEJS}
17 | {$define HasFS}
18 | {$ENDIF}
19 |
20 | {$IF FPC_FULLVERSION>30100}
21 | {$warn 6058 off} // cannot inline
22 | {$ENDIF}
23 |
24 |
--------------------------------------------------------------------------------
/compiler/packages/pastojs/src/pas2js_defines.inc:
--------------------------------------------------------------------------------
1 |
2 | {$inline on}
3 |
4 | {$IFDEF Windows}
5 | {$define CaseInsensitiveFilenames}
6 | {$define HasUNCPaths}
7 | {$ENDIF}
8 | {$IFDEF darwin}
9 | {$define CaseInsensitiveFilenames}
10 | {$ENDIF}
11 | {$IF defined(CaseInsensitiveFilenames) or defined(darwin)}
12 | {$DEFINE NotLiteralFilenames} // e.g. HFS+ normalizes file names
13 | {$ENDIF}
14 |
15 | {$IFDEF FPC}
16 | {$DEFINE UsePChar}
17 | {$DEFINE HasInt64}
18 | {$DEFINE HasStreams}
19 | {$DEFINE UTF8_RTL}
20 | {$DEFINE HasStdErr}
21 | {$DEFINE HasPas2jsFiler}
22 | {$DEFINE HASFILESYSTEM}
23 | {$ENDIF}
24 |
25 | {$IFDEF NODEJS}
26 | {$DEFINE HASFILESYSTEM}
27 | {$ENDIF}
28 |
29 |
30 |
--------------------------------------------------------------------------------
/compiler/utils/pas2js/pas2js.cfg:
--------------------------------------------------------------------------------
1 | #
2 | # Config file for pas2js compiler
3 | #
4 |
5 | # not yet implemented: -d is the same as #DEFINE
6 | # not yet implemented: -u is the same as #UNDEF
7 |
8 | # Write always a nice logo ;)
9 | -l
10 |
11 | # Display Hints, Warnings and Notes
12 | -vwnh
13 | # If you don't want so much verbosity use
14 | #-vw
15 |
16 | #IFDEF nodejs
17 | -Ji$CfgDir/dist/rtl.js
18 | #ENDIF
19 |
20 | -Fu$CfgDir/dist
21 | -Fu$CfgDir/../../../packages/*
22 |
23 | # end.
24 |
25 |
--------------------------------------------------------------------------------
/compiler/utils/pas2js/pas2js.res:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kryuski/pas2js-for-delphi/9cfdf70eb6c6e8f9f154d73f53dd26db9203ebed/compiler/utils/pas2js/pas2js.res
--------------------------------------------------------------------------------
/demo/asyncawait/asyncawaitdemos.lpg:
--------------------------------------------------------------------------------
1 |
2 |