[][src]Module genco::lang::python

Specialization for Python code generation.

Examples

String quoting in Python:

use genco::prelude::*;

let toks: python::Tokens = quote!("hello \n world");
assert_eq!("\"hello \\n world\"", toks.to_string()?);

let toks: python::Tokens = quote!(#(quoted("hello \n world")));
assert_eq!("\"hello \\n world\"", toks.to_string()?);

Structs

Config

Configuration for python.

Format

Formatting state for python.

Import

The import of a Python name from module import foo.

ImportModule

The import of a Python module import module.

Python

Language specialization for Python.

Enums

Any

A type-erased language item capable of holding any kind.

Functions

import

The import of a Python name from module import foo.

import_module

The import of a Python module import module.

Type Definitions

Tokens

Tokens container specialization for Python.