Commit Graph

130 Commits

Author SHA1 Message Date
Mattias Gaertner
e00e3b690b fcl-js: jswriter: double(high(int64))
git-svn-id: trunk@38117 -
2018-02-04 22:11:58 +00:00
Mattias Gaertner
d501448c04 jswriter: fixed double greater than int64
git-svn-id: trunk@38113 -
2018-02-04 18:48:26 +00:00
Mattias Gaertner
1ddbaa946c pastojs: nicer float 1E-12
git-svn-id: trunk@38112 -
2018-02-04 16:04:46 +00:00
Mattias Gaertner
20424d36e5 fcl-js: jswriter: shorter floats
git-svn-id: trunk@38110 -
2018-02-04 14:21:53 +00:00
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