Skip to content

DistroRickDev/snippet_generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Snippet (or code generator)

Introduction

Small code generator, basic functionion is divided in three parts:

  1. Parsing a *.dl file content into a string (raw_data)
  2. Tokenize the raw_string (only tokenize valid tokens and keywords) (throw excpection on invalid_token) a valid file shall look like this
     @binary //tells the generator that the file is a source code for a binary and not a library (@lib)
     struct { //tells the to generate a struct
         readonly attribute u8 m_value // const uint8 m_value
         method getValue{
             in: {}
             out: { m_value } // uint8 getValue() -> m_Value;
         }
     }
  1. Lexical analizer:

Alt

  1. Generate code (into constructed stream)
  2. Parse it to a source code file
  3. Export the file

About

Snipper generator in rust

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages