Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/ccxt/ast-transpiler into …
Browse files Browse the repository at this point in the history
…patch-csharp-test
  • Loading branch information
carlosmiei committed Nov 18, 2024
2 parents 421ade3 + 12aabaa commit 0822c68
Show file tree
Hide file tree
Showing 46 changed files with 8,165 additions and 342 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,19 @@ jobs:
run: npm ci
- name: Build
run: npm run build --if-present
- name: Test
run: go build ./tests/integration/go # debug just to download the go version, do this properly todo!
- name: Test
run: npm run test-ci
- name: Integration test
run: npm run integration
- name: Generating coverage badges
if: github.ref == 'refs/heads/master'
uses: jpb06/jest-badges-action@latest
with:
branches: master
- name: Pushing generated files
if: github.ref == 'refs/heads/master'
uses: EndBug/add-and-commit@v9 # You can change this to use a specific version.
with:
add: 'dist/ -f'
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ const transpiler = new Transpiler({
});

const ts = "const myVar = 1;"
const transpiledCode = transpiler.transpilePython(ts);
const transpiled = transpiler.transpilePython(ts);

console.log(transpileCode.content) // prints my_var = 1
console.log(transpiled.content) // prints my_var = 1
```

### Transpiling Typescript to PHP from file
Expand All @@ -96,11 +96,11 @@ console.log(transpileCode.content) // prints my_var = 1
const Transpiler = require(`ast-transpiler`);

const transpiler = new Transpiler();
const transpiledCode = transpiler.transpilePhpByPath("./my/path/file.ts");
const transpiled = transpiler.transpilePhpByPath("./my/path/file.ts");

console.log(transpiler.content) // prints transpiled php
console.log(transpiler.imports) // prints unified imports statements if any
console.log(transpiler.exports) // prints unified export statements if any
console.log(transpiled.content) // prints transpiled php
console.log(transpiled.imports) // prints unified imports statements if any
console.log(transpiled.exports) // prints unified export statements if any
```

## ⚡ C# Notes
Expand Down Expand Up @@ -128,7 +128,7 @@ Warning: Under active development so can change at any time!
- Basic string manipulation
- `concat`, `length`, `includes`, `indexOf`
- Basic arrays manipulation
- `includes`, `length`, `push`, `pop`, `shift`
- `includes`, `length`, `push`, `pop`, `reverse`, `shift`
- Basic object manipulation
- `Object.keys`, `Object.values`
- Binary expressions
Expand Down
2 changes: 1 addition & 1 deletion badges/coverage-branches.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 0822c68

Please sign in to comment.