Note that there are some explanatory texts on larger screens.

plurals
  1. POHtml Interpreter problems
    primarykey
    data
    text
    <p>On the side since last year i've been writing an interpreter for HTML. I don't think HTML is a very nice language, and thought I might create an interpreter that translates my nice looking code into HTML for use on the web.</p> <p>It works really well, and am using it on a little web app, but I'm having a problem parsing a particular line, and would appreciate any advice on how I could go about parsing it.</p> <p>My code:</p> <pre><code>HmtlDocument { Page.Title: "Test webpage using JTHtml"; Using[] { "../Assets/Stylesheets/default.css", "../Assets/Scripts/slidercordian", "../Assets/Scripts/jquery.1.4.1.js" }; HtmlBody { HtmlElement Divider(container) { HtmlElement Divider(Header) { HtmlElement Image(Logo, "../Assets/Images/logo.png"); HtmlElement Menu(MainMenu, Horizontal, Ul, li) { li.Text: "Home", "index.html"; li.Text: "About Us", "about.html"; li.Text: "Services", "services.html"; li.Text: "Contact Us", "contact.html"; li.Text: "My Account", "../myaccount/default.html"; } } HtmlElement Divider(MainContent) { HtmlElement Heading(Heading, 1) { Heading.Text: "Welcome!"; } HtmlElement Text(Text) { Text.Text: "Welcome to my new website written purely in jthtml"; } } } } </code></pre> <p>See, the problem I am having is with the following line:</p> <pre><code>li.Text: "[value]", [resource]"; </code></pre> <p>The old way I had it was to write it like this:</p> <pre><code>li.Text("[value]", "[resource]"); </code></pre> <p>However, that doesn't quite stay true to the rest of the syntax, which is why I would like to keep it like this:</p> <pre><code>li.Text: "[value]", "[resource]"; </code></pre> <p>But I'm just not sure how I would parse that line. I'm getting stuck because of the first closing quote and the following comma, space and second opening quote. I can't seem to figure out the right logic for it.</p> <p>Any help at all is appreciated.</p> <p>Thank you!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload