1.2.18 • Published 2 months ago

@darabonba/python-generator v1.2.18

Weekly downloads
22
License
Apache-2.0
Repository
github
Last release
2 months ago

English | 简体中文

Darabonba Python Generator

CI codecov NPM version npm download

Installation

Darabonba Code Generator was designed to work in Node.js. The preferred way to install the Generator is to use the NPM package manager. Simply type the following into a terminal window:

npm install @darabonba/python-generator

Usage

'use strict';

const path = require('path');
const fs = require('fs');

const Generator = require('@darabonba/python-generator');
const DSL = require('@darabonba/parser');

const modulePath = '<module path>';
const moduleOutputDir = '<output dir path>';

const teaFile = fs.readFileSync(path.join(modulePath, 'Darafile'), 'utf8');
const main = fs.readFileSync(path.join(modulePath, 'main.dara'), 'utf8');

const pkgInfo = JSON.parse(teaFile);
const config = {
    outputDir: moduleOutputDir,
    pkgDir: modulePath,
    ...pkgInfo
  };
// generate AST data by parser
const ast = DSL.parse(main, path.join(modulePath, 'main.dara'));
// initialize generator
const generator = new Generator(config, 'python');

generator.visit(ast);

Issues

Opening an Issue, Issues not conforming to the guidelines may be closed immediately.

Changelog

Detailed changes for each release are documented in the release notes.

License

Apache-2.0 Copyright (c) 2009-present, Alibaba Cloud All rights reserved.

1.2.18

2 months ago

1.2.17

5 months ago

1.2.16

8 months ago

1.2.14

1 year ago

1.2.15

1 year ago

1.2.12

2 years ago

1.2.13

2 years ago

1.2.11

2 years ago

1.2.9

2 years ago

1.2.10

2 years ago

1.2.8

3 years ago

1.2.7

3 years ago

1.2.6

3 years ago

1.2.5

3 years ago

1.2.4

3 years ago

1.2.3

3 years ago

1.2.2

3 years ago

1.2.1

3 years ago

1.2.0

3 years ago

1.1.1

3 years ago

1.1.0

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.0

4 years ago