matjp / jweb-editor

A JWEB editor for VS Code
https://marketplace.visualstudio.com/items?itemName=mjpvs.jweb-vscode-editor
MIT License
1 stars 0 forks source link

No program text was specified #1

Closed Pseudavid closed 10 months ago

Pseudavid commented 10 months ago

I'm triying to use Jweb to write a text game using the Gruescript language. I've written some text code like this

--- jweb:gru ---

This is some text comment.

```gru room testroom ```

However, the generated file is empty. This is the output:

This is JTANGLE (Version 0.1.9)

Flags: banner:true, progress:true, debug info:false, report no errors:true, comments:false, section numbers:false Web file name: c:\Users\David Mendaña\Desktop\sunlight.w Alt web file name: Change file name: Output file name: c:\Users\David Mendaña\Desktop\sunlight.gru Output language: gru *1 ! No program text was specified. (Did you see the warning message above?)

Could you please tell me what could be the problem here? Thanks.

matjp commented 10 months ago

The problem is that you have not defined a Code Section with the @c command i.e.

```gru @c room testroom ```

JWEB uses the same commands as CWEB - the manual is here.

Having said that, the code for your chosen language must still be able to be parsed by the JWEB engine. Unless your language is based on C style syntax the is a good probablity that it won't be able to be parsed. I myself have only tested JWEB with Javascript and Typescript.

Pseudavid commented 10 months ago

I understand. Sorry about the question, I'm very much an amateur with great limitations (that's why the literate paradigm sounds pretty good to me).

Thanks for your help!