Skip to content

nuflang/nuf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nuf language

Commands

Generate

Converts nuf file into html

generate <input-file-pathname> <output-file-pathname> where:

  • <input-file-pathname> - .nuf file
  • <output-file-pathname> - .html file
go run main.go generate ./test_data/text.nuf ./test_data/text.html

Syntax

Paragraph

Input:

"Paragraph 1";
"Paragraph 2";

Output:

<p>Paragraph 1</p>
<p>Paragraph 2</p>

Heading

Input:

section_title("Heading 1");
section_title("Heading 2");

Output:

<h1>Heading 1</h1>
<h1>Heading 2</h1>

Sections

Input:

section("site_navigation");
section("main");

Output:

<nav></nav>
<main></main>

Adding elements inside other elements

Input:

section_title("Heading 1") inside --main;

section("main");

Output:

<main>
    <h1>Heading 1</h1>
</main>

Attribution

Builds on top of

Packages

No packages published

Languages