Comments (5)
As I got, npm install
downloads Typescript 1.8.
I've modified package.json
.
"typescript": "^2.1.0"
And npm install
works.
But
$ npm test
> [email protected] test /home/georgy/ts2c
> cd tests && make -B
node ../ts2c.js arrays/array1.ts
gcc arrays/array1.c -ansi -pedantic -Wall -g -o arrays/array1.elf
valgrind --error-exitcode=1 --leak-check=yes --quiet ./arrays/array1.elf > arrays/array1.res
/bin/sh: 1: valgrind: not found
Makefile:14: recipe for target 'arrays/array1.res' failed
make: *** [arrays/array1.res] Error 127
npm ERR! Test failed. See above for more details.
from ts2c.
this is actually fine :) this test is failing, I haven't got it working yet.
you can remove parseHtml.ts temporarily or maybe use previous commit. The latest one is marked "work in progress" which means it's not finished.
from ts2c.
{ ...last, oneOrMore: true }
means same as
var newObj = shallowcopy(last); // or Object.assign({}, last);
newObj.oneOrMode = true;
return newObj;
So I believe the code should be correct.
Can you share the test you're having problem with, the one that leads to the while loop ending unexpectedly? What is the regex?
from ts2c.
Not sure.
That is what I got on npm install
.
> [email protected] prepublish /home/georgy/ts2c
> tsc
src/regex.ts(101,68): error TS1136: Property assignment expected.
src/regex.ts(101,86): error TS1005: ',' expected.
src/regex.ts(101,93): error TS1005: ',' expected.
src/regex.ts(101,94): error TS1005: ',' expected.
src/regex.ts(101,96): error TS1135: Argument expression expected.
src/regex.ts(101,97): error TS1128: Declaration or statement expected.
src/regex.ts(103,13): error TS1128: Declaration or statement expected.
src/regex.ts(129,22): error TS1005: ',' expected.
src/regex.ts(130,22): error TS1005: ';' expected.
src/regex.ts(130,29): error TS1005: ';' expected.
src/regex.ts(130,41): error TS1005: ',' expected.
src/regex.ts(130,51): error TS1005: ',' expected.
src/regex.ts(132,22): error TS1005: ';' expected.
src/regex.ts(133,18): error TS1005: ';' expected.
src/regex.ts(134,9): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected.
src/regex.ts(135,5): error TS1128: Declaration or statement expected.
src/regex.ts(136,1): error TS1128: Declaration or statement expected.
src/regex.ts(177,36): error TS1136: Property assignment expected.
src/regex.ts(177,50): error TS1005: ',' expected.
src/regex.ts(177,67): error TS1005: ',' expected.
src/regex.ts(177,68): error TS1128: Declaration or statement expected.
src/regex.ts(179,13): error TS1138: Parameter declaration expected.
src/regex.ts(179,71): error TS1005: ';' expected.
src/regex.ts(186,5): error TS1128: Declaration or statement expected.
src/regex.ts(188,5): error TS1128: Declaration or statement expected.
src/regex.ts(188,33): error TS1005: ',' expected.
src/regex.ts(188,60): error TS1005: ',' expected.
src/regex.ts(188,72): error TS1005: ';' expected.
src/regex.ts(268,53): error TS1136: Property assignment expected.
src/regex.ts(268,90): error TS1005: ',' expected.
src/regex.ts(268,91): error TS1128: Declaration or statement expected.
src/regex.ts(278,5): error TS1128: Declaration or statement expected.
src/regex.ts(280,5): error TS1128: Declaration or statement expected.
src/regex.ts(280,27): error TS1005: ';' expected.
src/regex.ts(280,42): error TS1005: ';' expected.
src/regex.ts(287,1): error TS1128: Declaration or statement expected.
npm ERR! Linux 4.4.0-78-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! node v6.10.3
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! [email protected] prepublish: `tsc`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] prepublish script 'tsc'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the ts2c package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! tsc
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs ts2c
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls ts2c
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/georgy/ts2c/npm-debug.log
On npm test
:
> [email protected] test /home/georgy/ts2c
> cd tests && make -B
node ../ts2c.js arrays/array1.ts
/home/georgy/ts2c/src/regex.js:95
break;
^^^^^
SyntaxError: Illegal break statement
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:542:28)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/home/georgy/ts2c/src/nodes/regexfunc.js:10:15)
Makefile:10: recipe for target 'arrays/array1.c' failed
make: *** [arrays/array1.c] Error 1
npm ERR! Test failed. See above for more details.
from ts2c.
Installed valgrind. Now it fails to build parseHtml.c
.
from ts2c.
Related Issues (20)
- Calling C Functions
- Feature: Classes (for TS at least) HOT 8
- Finishing ES3 features once and for all HOT 6
- Compiling TypeScript to C via WebAssembly HOT 2
- Please include the original code as a comment in the transpiled code HOT 12
- Memory allocation bug HOT 6
- Function.prototype.toString HOT 1
- C functions HOT 2
- Syntax errors are handled incorrectly
- Playground autocomplete keeps repeating
- Order in which properties are added is not honored
- Incorrect generation of 'free' call
- Using C++ instead of C? HOT 4
- npm - Unexpected end of JSON
- Error when combining "for in" and "for of"
- labelled statements don't work
- Ain't work HOT 1
- arguments array ain;t work
- problem with functions called main
- error with functions returning functions HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ts2c.