I wrote my own programming language that allows for much more efficient and time-saving writing of static webistes. It is written in rust for maximum speed
Atra Because that's what we're talking about now. It's a programming language that compiles to html, but allows you to use components, has a C-like syntax, It has built functions like %loop(3){}
Simple page in Atra(more fomplex example https://github.com/funcieqDEV/Atra/tree/main/examples/atra_showcase)
text("<!DOCTYPE html>");
html(lang="en"){
head(){
meta(charset = "utf-8);
title(){
text("Document");
}
}
body(){
p(){
text("Hello world");
}
}
}
the component system allows us to use code written once many times, so let's add a component to the previous code
$describe(What,Description){
h3(){text("{What}";)}
p(){text("{Desription}");}
}
text("<!DOCTYPE html>");
html(lang="en"){
head(){
meta(charset = "utf-8);
title(){
text("Document");
}
}
body(){
p(){
text("Hello world");
}
%each("apple", "Orange", "Tomato" , "Tangerine"){
$describe(item, "Small round and to the mouth");
}
}
}
As you can see, each component must start with $
Top comments (2)
Pretty cool seeing you actually build your own language out, I always wonder what keeps someone going through all the tedious details on stuff like this.
Thanks, Well it's not my first language so I have experience, But you have to predict all the characters that the programmer may enter and handle them appropriately., And then you need to check if the syntax is correct, Well, there is quite a bit of it
Some comments may only be visible to logged-in visitors. Sign in to view all comments.