Extract tokens by simple condition expression.

Related tags

Utilities condex
Overview

Condex


Extract tokens by simple condition expression.

CI Crates.io Licensed Twitter

| Docs | Latest Note |

[dependencies]
condex = "1.0.0"

Example

    #[derive(Debug, Clone, Copy, PartialEq)]
    enum Token {
        TagName,
        NameType,
        Value,
        AllInOne,
    }
    impl TokenKind for Token {}

    let mut builder = CondexBuilder::new(&[
        (Token::TagName, &["@-("]),
        (Token::NameType, &["[(,]  -  :  - [,=]"]),
        (Token::Value, &["=-[,)]"]),
        (Token::AllInOne, &["@-(", "[(,]  -  :  - [,=]", "=-[,)]"]),
    ]);

    let source = "@hello-man(name: type = value, name2: type2, name3: type3 = value3)";

    for (i, c) in source.char_indices() {
        builder.test(c, i);
    }
    let finals = builder.finalize_with_source(source);
    eprintln!("{:#?}", finals);
    
You might also like...
Simple popup for using marks in Sway

Simple popup for using marks in Sway This allows you to use vim-like marks in sway easily. Usage: bindsym --to-code $mod+m exec sway-marker mark binds

Simple RSA VDF in Rust

Simple RSA VDF in Rust

Simple color picker that lets the user create harmonic palettes with ease.
Simple color picker that lets the user create harmonic palettes with ease.

epick Simple color picker that lets the user create harmonic palettes with ease. Get it You can checkout the web demo over here or get a native binary

Simple pomodoro timer with notifications
Simple pomodoro timer with notifications

omo Simple pomodoro timer with notifications Installation

Simple comparison app for iRacing car setups.
Simple comparison app for iRacing car setups.

CarTunes Simple comparison app for iRacing car setups. About Export a setup in the iRacing garage and CarTunes will let you compare it with other setu

Simple Spreadsheet editor written in Rust

Rexcel Simple Spreadsheet editor written in Rust Keyboard Shortcuts: CTRL + S = Save CTRL + Q = Quit CTRL + W + Save And Quit CTRL + ALT + S = Sav

simple epoch-based reclamation

ebr a simple epoch-based reclamation (EBR) library with low cacheline ping-pong. use ebr::Ebr; let mut ebr: EbrBoxu64 = Ebr::default(); let mut

A simple omegle API written in Rust

omegalul-rs omegalul-rs is a work-in-progress opensource library for building Omegle clients. Features Current Features Fetching random server from om

Simple interoperability between C++ coroutines and asynchronous Rust

cxx-async Overview cxx-async is a Rust crate that extends the cxx library to provide seamless interoperability between asynchronous Rust code using as

Owner
Doha Lee
I will change the world.
Doha Lee
Like jq, but for HTML. Uses CSS selectors to extract bits content from HTML files.

Like jq, but for HTML. Uses CSS selectors to extract bits content from HTML files. Mozilla's MDN has a good reference for CSS selector syntax.

Michael Maclean 6.3k Jan 3, 2023
This contract is to provide vesting account feature for the both cw20 and native tokens, which is controlled by a master address

Token Vesting This contract is to provide vesting account feature for the both cw20 and native tokens, which is controlled by a master address. Instan

yys 7 Oct 7, 2022
A replit.com scraper, designed to grab discord tokens. Made in Rust.

Scraper A discord token scraper, designed to scrape forks from replit.com. This script uses the Graphql api on replit to essentially pull forks. Setup

Shell 18 Jan 2, 2023
A high-performance Lambda authorizer for API Gateway that can validate OIDC tokens

oidc-authorizer A high-performance token-based API Gateway authorizer Lambda that can validate OIDC-issued JWT tokens. ?? Use case This project provid

Luciano Mammino 4 Oct 30, 2023
A merkle-based token distributor for the Solana network that allows distributing a combination of unlocked and linearly unlocked tokens.

merkle-distributor A program for distributing tokens efficiently via uploading a Merkle root. Claiming Airdrop via CLI To claim via CLI instead of usi

null 6 Dec 8, 2023
Simple timer for your terminal

consoleTimer Simple timer that allows you to initiate countdown from N seconds. Usage: consoletimer [time in seconds] consoletimer [time in minutes]m

Arthur 20 Apr 4, 2022
Simple tool for scaffolding

quick-skeleton tldr; Lightweight replacement for yeoman or slush. Powered by handlebars. This is a scaffolding tool to save you hours of writing boile

Arthur 23 Apr 21, 2022
Simple git/hg tui client focused on keyboard shortcuts

verco A simple Git/Hg tui client focused on keyboard shortcuts Screenshots Platforms This project uses Cargo and pure Rust stable and works on latest

Matheus Lessa Rodrigues 214 Dec 26, 2022
Simple ray tracer written in Rust

Simple ray tracer written in Rust from scratch I've just finished my first semester at the Faculty of Applied Mathematics and Computer Science at the

Vladislav 190 Dec 21, 2022
Czkawka is a simple, fast and easy to use app to remove unnecessary files from your computer.

Multi functional app to find duplicates, empty folders, similar images etc.

Rafał Mikrut 9.2k Jan 4, 2023