Code Monkey home page Code Monkey logo

pkl_fast's Introduction

Pkl_fast

Overview

pkl_fast is a Rust library aiming to become an efficient tool for working with Apple's Pkl format. The library shall provide fast and reliable parsing and manipulation capabilities for Pkl files in Rust projects.

Note: This library is still in development. The lexer part is completed, and work on the parser has begun.

Features

  • Efficient lexer for tokenizing Pkl files (using the blazingly fast logos crate), using winnow parsing library instead as logos is too limited (no support for look-ahead in regex)
  • The parser is currently under development and is intended to return the Pkl file as statements. It will also provide warnings for non-recommended code practices and display errors as needed.
  • Designed for speed and reliability.

Todo List

  • Parsing basic values (e.g., int, float, boolean, string, datasize, duration)

  • Parsing objects declaration

  • Parsing Map, Set, List

  • Parsing Mapping, Listing

  • Parsing simple type annotations (Int, Float, UInt16, unknown, Any)

  • Parsing more complex type annotations (e.g., Listing<Type>, Mapping<Type, OtherType>) without type checking

  • Adding type checking

  • Parsing import/import\* statement (with optional as)

  • Parsing amends statement

  • Parsing extends statement

  • Parsing module statement

  • Parsing variable declaration statement (partially done)

  • Parsing class statement

  • Parsing function statement

  • Parsing @ModuleInfo/@Deprecated annotation

  • Parsing typealias annotation (partially done, need to support unions)

  • Parsing If/Else/Let/For/When statement

  • Parsing Arithmetic expressions

  • Parsing Function call expressions

  • Parsing InterpolatedString expressions

  • Generating a symbol table from the statements

How to implement in Rust ?

Here is a list of pkl's features that should be implemented in rust, but which are not obvious to implement.

None for the moment, but there will be for sure...

Contact

For questions, suggestions, or feedback, please reach out to me at [email protected]. Pull requests are appreciated, and issues are welcome too! Thank you for your interest in contributing to the project!

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.