Giter VIP home page Giter VIP logo

zatlin-rs's Introduction

Zatlin

概要

これはZatlinのRust移植版のライブラリです. 現時点ではVer 1.1をある程度実装しております.

本家と異なる部分

把握している限りの相違部分は以下のものとなります.

  • エラーの出力異なる
  • リトライ方法が異なる

zatlinマクロ

zatlinマクロを使用することで,Rustでzatlin構文をほぼそのままで記述することが可能となります.

let data = zatlin! {
    Cs = "" | "b" | "p" | "f" | "v" | "d" | "t" | "s" | "z" | "c" | "j" | "g" | "k" | "h" | "q" | "r" | "w" | "n" | "m"
    Ce = "" | "b" | "d" | "g" | "m" | "n" | "h"

    Va = "a" | "á" | "à" | "ä";
    Ve = "e" | "é" | "è" | "ë";
    Vi = "i" | "í" | "ì" | "ï";
    Vo = "o" | "ó" | "ò" | "ö";
    Vu = "u" | "ú" | "ù" | "ü";
    Vy = "y" | "ý" | "ỳ" | "ÿ";

    Vxi = (Va | Ve | Vo) "i" | Vi ("a" | "e")
    Vxu = (Va | Vo) "u" | Vu ("e" | "i")
    Vx = Va | Ve | Vi | Vo | Vu | Vy | Vxi | Vxu

    % Cs Vx Ce | Cs Vx Ce Cs Vx Ce - ^ Vy | ^ "w" Vu | ^ ("h" | "q" | "r" | "n" | "m") Vy;
}?;
let result = zatlin::generate_by(&data)?;

マクロを使用する場合には,featuresにて"use_macro"を指定する必要があります.

[dependencies]
zatlin = { version = "0.2", features = [ "use_macro" ] }

マクロの制限

  • 行末でのセミコロンの省略ができない.

zatlin-rs's People

Contributors

nobuyuki-tokuchi avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.