midlang / mid Goto Github PK
View Code? Open in Web Editor NEWmid is a generic domain-specific language for generating code and documentation
Home Page: https://midlang.org
License: MIT License
mid is a generic domain-specific language for generating code and documentation
Home Page: https://midlang.org
License: MIT License
Implements generator gencpp
for language cpp
Template file can contains a optional meta header, e.g.
---
dir: aaa
file: {{.Name}}.go
var1: xxx
var2: yyy
---
{{/* Template body */}}
The meta header starts with a line ---
and ends with a line ---
. Contents of meta contains many key: value
pairs.
The structure of meta maybe like:
type TemplateMeta struct {
Dir string
File string
Date string
Values map[string]string
}
Extention is a template group
Template API and usage documents needed.
include
function used to include a file. I want to use a directory which named includes
to store all included files.
Implment proto
extension for cpp
proto
encoding packageproto
extension templatesjust wanted to aks a few things.
this looks really good.
I like hwo the templates are seperated into parts. Makes it very easy.
I currently work with protobufs, goang, c++ and QT.
SO at the moment i am using this:
https://github.com/moul/protoc-gen-gotemplate
Its nice and generates the GRPC with any bindings because its based on gokit.
Here is a good example: https://github.com/moul/protoc-gen-gotemplate/tree/master/examples/go-kit
SO this gets me a Service and Client and structs.
Not bad but i also need to gen a fair bit of database code (using boltdb), a file storgae layer (using minio), and some c++ and QML (for client).
So you seem to be using your own DSL as a basis to gen from, and i was thinking how best to map to it. Any ideas ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.