Commit Graph

176 Commits

Author SHA1 Message Date
Mattias Gaertner
d9a878b0da fcl-js: fixed writing - - and + +
git-svn-id: trunk@38106 -
2018-02-04 09:59:43 +00:00
Mattias Gaertner
7205ecb0f2 fcl-js: fixed comment in jssrcmap
git-svn-id: trunk@38083 -
2018-01-31 11:25:38 +00:00
Mattias Gaertner
ef7d13d112 pas2js: fixed srcmap header
git-svn-id: trunk@38033 -
2018-01-25 10:42:23 +00:00
Mattias Gaertner
c98c70548a fcl-js: srcmap: disable safety header by default, because not supported by Firefox
git-svn-id: trunk@38029 -
2018-01-25 09:06:54 +00:00
Mattias Gaertner
0a30e6ef26 pastojs: static array: multi dim: const init
git-svn-id: trunk@37994 -
2018-01-18 14:36:19 +00:00
Mattias Gaertner
096c386aac fcl-js: write ?: with empty B and C
git-svn-id: trunk@37986 -
2018-01-17 15:01:03 +00:00
Mattias Gaertner
a8f18c29fb fcl-js: test var a=1,b=2,c=3
git-svn-id: trunk@37766 -
2017-12-20 00:32:32 +00:00
Mattias Gaertner
4e4a4a465b fcl-js: fixed writing brackets around binary B
git-svn-id: trunk@37677 -
2017-12-05 15:22:15 +00:00
Mattias Gaertner
d045d1888d fcl-js: fixed tests
git-svn-id: trunk@37591 -
2017-11-14 11:42:46 +00:00
Mattias Gaertner
2a57480fff fcl-js: no brackets in var-comma
git-svn-id: trunk@37578 -
2017-11-12 14:14:04 +00:00
pierre
d18627f0af * Update all fpcsrc Makefile's using latest fpcmake version 2017-09-21 rev 37286
git-svn-id: trunk@37462 -
2017-10-16 00:27:27 +00:00
Mattias Gaertner
88c515a6c4 fcl-js: jswriter: accelerated WriteJS
git-svn-id: trunk@37288 -
2017-09-21 10:59:40 +00:00
Mattias Gaertner
4b4e40c98e fcl-js: added example srcmapdump
git-svn-id: trunk@37263 -
2017-09-20 09:08:07 +00:00
Mattias Gaertner
5e2ebcd019 fcl-js: added DebugSrcMapLine
git-svn-id: trunk@37262 -
2017-09-20 09:07:07 +00:00
Mattias Gaertner
6791127952 fcl-js: jswriter: if-else: use bfalse position
git-svn-id: trunk@37240 -
2017-09-17 20:33:02 +00:00
Mattias Gaertner
51fd3d9ff6 fcl-js: sourcemap: added TSourceMap.IndexOfSegmentAt
git-svn-id: trunk@37234 -
2017-09-17 19:49:29 +00:00
michael
bb31bc6ca4 * Compile & install jssrcmap
git-svn-id: trunk@37134 -
2017-09-03 16:39:34 +00:00
Károly Balogh
04dee0fc04 regenerated Makefiles for m68k-macos target
git-svn-id: trunk@37034 -
2017-08-22 11:16:42 +00:00
Károly Balogh
4c25bd935f packages: disabled packages for macos and palmos which currently cannot be built for these
git-svn-id: trunk@36889 -
2017-08-12 21:08:34 +00:00
Mattias Gaertner
627323b96e fcl-js: jswriter: nicer CurElement for srcmaps
git-svn-id: trunk@36680 -
2017-07-08 12:44:46 +00:00
Mattias Gaertner
97fd5b956a fcl-js: comments
git-svn-id: trunk@36667 -
2017-07-07 17:30:28 +00:00
Mattias Gaertner
a9502f9d3d fcl-js: parse source map
git-svn-id: trunk@36647 -
2017-07-05 19:50:16 +00:00
Mattias Gaertner
84b08b61a8 fcl-js: jssrcmap: added property SourceTranslatedFiles to allow custom filenames written to JSON
git-svn-id: trunk@36600 -
2017-06-26 16:19:08 +00:00
Mattias Gaertner
a66eaa4769 fcl-js: jswriter: allow overriding Writing, less grows(faster and less allocations)
git-svn-id: trunk@36599 -
2017-06-26 16:17:34 +00:00
Mattias Gaertner
d039fa9b15 fcl-js: sourcemap: write optional sourcesContent
git-svn-id: trunk@36494 -
2017-06-12 18:43:52 +00:00
Mattias Gaertner
5a008e945b fcl-js: sourcemap: write optional sourcesContent
git-svn-id: trunk@36493 -
2017-06-12 18:42:07 +00:00
Mattias Gaertner
2df7e116e3 fcl-js: added TSourceMap
git-svn-id: trunk@36492 -
2017-06-12 18:23:25 +00:00
Mattias Gaertner
64fc72af2a fcl-jssrc: TJSElement.Row renamed to Column
git-svn-id: trunk@36471 -
2017-06-09 17:38:54 +00:00
pierre
7a172d3d5a Regenerated all Makefile from packages directories
git-svn-id: trunk@36395 -
2017-06-01 14:15:50 +00:00
Mattias Gaertner
5006de1d40 fcl-js: comment
git-svn-id: trunk@36235 -
2017-05-17 08:24:33 +00:00
pierre
17b2671213 Regenerate all Makefile's after changes related to FPCDIR checks
git-svn-id: trunk@35833 -
2017-04-18 14:15:47 +00:00
Mattias Gaertner
9f5906e115 fcl-js: added TJSArrayLiteral.AddElement TJSNewMemberExpression.AddArg TJSCallExpression.AddArg
git-svn-id: trunk@35789 -
2017-04-14 15:48:09 +00:00
michael
510352e121 * Patch from Mattias Gaertner: when an if-statement has an else always use {} for the BTrue
git-svn-id: trunk@35651 -
2017-03-24 12:09:38 +00:00
michael
676b25cc93 * Patch from Mattias Gaertner to fix new (a())()
git-svn-id: trunk@35640 -
2017-03-23 15:01:16 +00:00
michael
44c5fe99c9 * Patch from Mattias Gaertner:
jswriter: 
    fixed some empty lines 
  pasresolver: 
    procedure str, function str
  fppas2js: 
    procedure str,function str
    write less empty blocks
    target platform browser and nodejs

git-svn-id: trunk@35633 -
2017-03-20 23:29:53 +00:00
michael
7b38e90513 * Patch from Mattias gaertner to write less empty lines
git-svn-id: trunk@35577 -
2017-03-14 10:46:29 +00:00
michael
d6bd57beea * Patch from Mattias Gaertner to fix range error
git-svn-id: trunk@35576 -
2017-03-14 10:10:47 +00:00
michael
2fbe76532f * Patch from Mattias Gaertner
- fixed writing UTF-8.
  - indent multi line literals, used by asm blocks
  - fixed writing (a+b).c

git-svn-id: trunk@35502 -
2017-03-01 17:36:35 +00:00
michael
92af9c1670 * Patch from Mattias Gaertner, better descriptive comment
git-svn-id: trunk@35490 -
2017-02-28 13:22:40 +00:00
michael
f022fdc848 * Patch from Mattias Gaertner:
- moved function IsValidJSIdentifier, also needed for code not writing js

git-svn-id: trunk@35471 -
2017-02-22 20:57:54 +00:00
michael
bc22805000 * Patch from Mattias Gaertner:
pastree: 
    - allow custom data to be chained.
  pparser:
    - procedure modifier assembler
    - Self[]
    - Self.member
    - fixed some wrong parents
  pasresolver:
    - aString[i]:=
    - check proc external modifier
    - test if WithExprScope is set
    - Self[]
    - Self.member
  fppas2js:
    - proc assembler modifier
    - assigned(class-instance)
    - class default property
    - low(array), high(array)
    - multi dim arrays [index1,index2] -> [index1][index2]
    - string: read and write char aString[]
    - procedure modifier external name 'funcname'
    - option to add "use strict";
    - with-do using local var
    - with record do i:=v;
    - with classinstance do begin create; i:=v; f(); i:=a[]; end;
    - Self[]
    - Self.member

git-svn-id: trunk@35428 -
2017-02-12 15:16:00 +00:00
michael
55241e283f * Patch from Mattias Gaertner
- quote object keys if needed  { "1":"value" }
  - use " or ' for string literals

git-svn-id: trunk@35416 -
2017-02-10 23:24:13 +00:00
michael
767645014c * Patch from Mattias Gaertner:
jswriter: 
    less duplicate brackets
  pasresolver:  
    break, continue, option to fix case of overrides
  pas2js:
    procedure args default values,
    try..except,
    try..except..on..else,
    raise, raise E,
    class vars, 
    call class methods,
    break,
    continue,
    rename name conflicts with JS identifiers: apply, call, null, ...

git-svn-id: trunk@35402 -
2017-02-06 10:44:39 +00:00
michael
393b4caba2 * Patch from Mattias Gaertner:
jswriter: more compact try..catch

pasresolver:
- mark function calls without ()
- "with type do ;"
- constructor call store TPasType
- mark if a constructor call creates a new
  instance or is a normal call
- same for destructor
- fixed checking assign operator types
- more tests

fppas2js:
- convert implicit calls in Pascal to explicit calls in JS
- built in procedure "exit" and "exit(value)"
- if loopvar is used afterwards append  if($loopend>i)i--;
- classes
  - declare using createClass, needs rtl magic
  - constructor
  - destructor
  - vars
  - ancestor
  - virtual, override, abstract
  - "is" operator
  - "as" operator
  - call inherited "inherited;", "inherited funcname;"
- dynamic arrays
  - init as "arr = []"
  - SetLength(arr,newlength)
  - length(arr)
- try..except, on .. do, raise
- insert default values in calls

git-svn-id: trunk@35383 -
2017-02-04 11:26:59 +00:00
michael
b08297a667 * Fix from Mattias Gaertner to implement calling functions without arguments.
git-svn-id: trunk@35166 -
2016-12-18 16:22:23 +00:00
michael
d6d10a522a * Patch from Mattias Gaertner
- more tests
   - case-of: added option to change between switch and if-else
   - Some changes to the way the implementation block is generated for units.

git-svn-id: trunk@35055 -
2016-12-04 09:35:53 +00:00
Mattias Gaertner
7f8cdc56d3 undo accidental commit: fppas2js: test TestFunctionResult
git-svn-id: trunk@35023 -
2016-11-30 10:29:13 +00:00
Mattias Gaertner
3bb089223b fppas2js: test TestOperators1
git-svn-id: trunk@35022 -
2016-11-30 10:23:57 +00:00
michael
8bbc792a4f * Patch from Mattias Gaertner for pas2js:
jsbase: Changed TJSString from WideString to UnicodeString to use ref counting on Windows.
  jsbase: Added TJSValue.CustomValue.
  fppas2js: Changed context from pas to js context. 
            The pas context is already in the resolver values. 
  fppas2js: Support for type alias
  fppas2js: Built in functions inc/dec for integers

git-svn-id: trunk@34851 -
2016-11-09 16:26:21 +00:00
michael
6610518d73 * Added dependency on fcl-base
git-svn-id: trunk@34654 -
2016-10-08 12:01:46 +00:00
michael
95eb4ed2eb * Added jsminifier unit
git-svn-id: trunk@34652 -
2016-10-08 08:14:42 +00:00
michael
3a3f490234 * Added copyright header
git-svn-id: trunk@34651 -
2016-10-08 08:11:41 +00:00
michael
a55c176bef * Patch from Mattias Gaertner: Record support, detect duplicate identifiers, bug fixes
git-svn-id: trunk@34520 -
2016-09-13 08:01:37 +00:00
michael
7712f049df * Patch from Mattias Gaertner to fix writing superfluous semicolons after statement lists.
git-svn-id: trunk@34226 -
2016-07-29 14:23:41 +00:00
michael
19bd74faa9 * Patch from Mattias Gaertner
- jstree: add some explanatory comments 
  - jswriter: 
    TJSWriter.WriteSourceElements write functions and vars, 
    fixed unneeded semicolon in TJSWriter.WriteFuncDef.

git-svn-id: trunk@34217 -
2016-07-28 11:17:03 +00:00
michael
16ce35ea9b * Patch from Mattias Gaertner to make EscapeString a normal method + Fix casing
git-svn-id: trunk@34213 -
2016-07-27 11:32:27 +00:00
michael
1d6900e800 * Patch from Mattias Gaertner to fixed type casts AsString is a TJSString.
git-svn-id: trunk@34212 -
2016-07-27 11:30:13 +00:00
michael
62f39e0037 * Some clean-up patches by Mattias
git-svn-id: trunk@34204 -
2016-07-26 15:05:39 +00:00
michael
1606976cfa * Patch from Mattias Gaertner to avoid some non-set function results
git-svn-id: trunk@34096 -
2016-07-11 11:43:36 +00:00
nickysn
5306ee552b * regenerated makefiles with latest fpcmake
git-svn-id: trunk@34008 -
2016-06-18 01:00:45 +00:00
nickysn
a58dd988a4 * regenerate makefiles after the fpcmake update
git-svn-id: trunk@34002 -
2016-06-17 22:05:59 +00:00
nickysn
02d6f7a2a4 - disabled the win16 target for all packages that don't compile on that platform
git-svn-id: trunk@31857 -
2015-09-27 19:32:44 +00:00
nickysn
e83f3d2978 * updated all the remaining makefiles that 'fpcmake -r' missed
git-svn-id: trunk@31527 -
2015-09-05 11:21:36 +00:00
joost
46906833f1 * Re-generated makefile's
git-svn-id: trunk@31318 -
2015-08-12 19:47:44 +00:00
joost
ac87da7c42 * Filter the Makefile's unit searchpaths from the fpmake command line.
To void cluttering the .fpm file

git-svn-id: trunk@31317 -
2015-08-12 19:15:14 +00:00
Károly Balogh
77bdd83bfc AROS/x86_64: regenerated Makefiles
git-svn-id: trunk@31177 -
2015-06-29 00:09:06 +00:00
Jonas Maebe
89418d23e5 * regenerated Makefiles with Linux/AArch64 support
git-svn-id: trunk@30891 -
2015-05-20 20:15:10 +00:00
Jonas Maebe
fa328436ab * regenerated for iphonesim/x86-64
git-svn-id: trunk@29974 -
2015-02-23 22:56:41 +00:00
Jonas Maebe
3d01d4ceb1 * regenerated with Darwin/AArch64 support
git-svn-id: trunk@29950 -
2015-02-23 22:54:53 +00:00
joost
1a90d29063 * Re-generated packages-Makefile.fpcs and Makefiles
git-svn-id: trunk@29409 -
2015-01-05 11:34:47 +00:00
marco
d407b668d1 * version updated to 3.1.1
git-svn-id: trunk@29399 -
2015-01-04 21:09:04 +00:00
joost
0574714317 * Use short 8.3 names for archives on limit83fs-hosts
git-svn-id: trunk@29174 -
2014-11-28 21:35:46 +00:00
Károly Balogh
da7efb8607 AROS: regenerated Makefiles to support i386-aros
git-svn-id: trunk@28438 -
2014-08-17 23:16:47 +00:00
michael
e05b77e759 * Check for nil
git-svn-id: trunk@27475 -
2014-04-05 09:07:00 +00:00
michael
910e5ff888 * Compact arrays/object literals and func. arguments
git-svn-id: trunk@27457 -
2014-04-03 20:17:26 +00:00
michael
dd8f4eccf2 * Correct compact writing of source elements
git-svn-id: trunk@27456 -
2014-04-03 20:05:58 +00:00
michael
26e73a4daf * Created version without classes
git-svn-id: trunk@27091 -
2014-03-11 10:50:05 +00:00
michael
c07559bbd1 * In view of recent bug, use traditional for i:=Low() to High instead of for in
git-svn-id: trunk@27090 -
2014-03-11 10:48:30 +00:00
michael
06451dd9ab * Forgot to commit (adds jstoken, tswriter)
git-svn-id: trunk@27036 -
2014-03-08 16:36:58 +00:00
michael
0c8f3d6c12 * Javascript writer
git-svn-id: trunk@27035 -
2014-03-08 14:45:49 +00:00
michael
0de9c58092 * Tokens separated out of parser, needed in writer.
git-svn-id: trunk@27034 -
2014-03-08 14:45:34 +00:00
michael
cedcd354b3 * Use jstoken
git-svn-id: trunk@27033 -
2014-03-08 14:44:56 +00:00
michael
a748d37f9b * Tests for switch parsing
git-svn-id: trunk@27032 -
2014-03-08 14:44:26 +00:00
michael
fd61a17460 * Functions to aid in writing
git-svn-id: trunk@27031 -
2014-03-08 14:43:53 +00:00
michael
39efecf5df * Regex parsing
git-svn-id: trunk@27030 -
2014-03-08 14:43:23 +00:00
michael
2d60f0d576 * Regex scanning
git-svn-id: trunk@27029 -
2014-03-08 14:43:12 +00:00
michael
cc88c609c8 * Fixed known memory leaks, removed some debug statements and change TJSPrimaryExpressionIdent.AString -> name
git-svn-id: trunk@26822 -
2014-02-21 12:59:13 +00:00
michael
5c158507cf * Added some ease-of-use constructors
git-svn-id: trunk@26821 -
2014-02-21 12:58:00 +00:00
michael
1785a12670 * Fixed known memory leaks
git-svn-id: trunk@26820 -
2014-02-21 12:57:32 +00:00
michael
7d61aa0404 * Fixed known memory leaks
git-svn-id: trunk@26819 -
2014-02-21 12:56:58 +00:00
yury
73c26bd6be * mipsel-android: Regenerated makefiles. From now the mipsel-android target can be built and used.
git-svn-id: trunk@26705 -
2014-02-07 12:37:17 +00:00
Tomas Hajny
77967432ef * always use forward slashes in path to fpmake similarly to paths to other tools in Makefiles
git-svn-id: trunk@26641 -
2014-02-01 00:11:09 +00:00
florian
6377c180bf * disable packages which do not build on msdos
git-svn-id: trunk@25236 -
2013-08-11 16:12:34 +00:00
joost
df4191acb3 * Handle the location of each package at run-time, not at compilation time
* Added a fpmake.pp in the root, to compile the utils and packages in one go

git-svn-id: trunk@24783 -
2013-06-02 17:55:23 +00:00
pierre
884918a4c4 Regenerate all Makefiles with an up-to-date fpcmake binary
git-svn-id: trunk@24365 -
2013-04-29 12:27:42 +00:00
joost
527c407b62 * Re-generated Makefiles for the changes in the Makefile.fpcs in r24349
git-svn-id: trunk@24350 -
2013-04-27 20:48:14 +00:00
joost
20a3809e58 * Now zipinstall is passed to fpmake by all Makefile.fpc's
git-svn-id: trunk@24349 -
2013-04-27 20:34:00 +00:00
yury
23b95a4d70 * Regenerated all makefiles.
git-svn-id: branches/targetandroid@23422 -
2013-01-17 11:36:12 +00:00
florian
eb7882037a * disable uncompilable targets for embedded targets
git-svn-id: trunk@23257 -
2012-12-31 15:51:04 +00:00
joost
316717a710 * Re-generated all the Makefile.fpcs from the packages. So they are almost all the same now.
git-svn-id: trunk@23001 -
2012-11-17 00:18:50 +00:00