HTPL Compiler
  • HTPL Compiler
  • Introduction
  • Github repository
  • What is HTPL and why it exists
  • Getting started
  • Syntax
    • Variable declaration
    • Returning values
    • Operations between values
    • Value assignment
    • If then else branches
    • Comparison and logical operators
    • Function declaration and invocation
    • While loop
    • Inputs and outputs
    • Comments
  • Other
    • HTPLCompiler interface - Browser
    • Error handling
Powered by GitBook
On this page

Was this helpful?

  1. Syntax

Value assignment

The <h2> element is used to assign a new value to an existing variable, specified by the id. For example:

<h2 id="foo">
    <b id="+">
        <p id="10"></p>
        <p id="foo"></p>
    </b>
</h2>

is compiled as

foo = 10 + foo

Please note that foo must be previously declared with <h1> element. If foo is not previously declared, the compiler won't give you an error, but the JS code will not work.

PreviousOperations between valuesNextIf then else branches

Last updated 4 years ago

Was this helpful?