S!ML Snap! Markup Language [WIP + Help]

link
Read the project notes too!

S!ML is kind of like HTML in Snap! it is WIP but I am having issues. It was working but now it is not, the -color- aittribute.

Should be used like -color-red -p-hello

output: red text:hello

instead it comes out blue. Please help.

To use: Read notes, also attributes/tags have NO closing. One word per -p- tag. Example.

-color-black -p-hi -p-there

No capitals because shift key is NOT supported!

BUMP

i need help!

also new update.

- this is a comment
-var-(var name) - this creates a var
-varv(ID)-(value) - sets var value
Variable ID's: ID's identify the variable easier. Every var you create with the -var- tag has an ID. The first -var- tag used in the script makes the ID of the var "1". the second variable you create is "2" and so on. Your variable is named what you named it, but the variable creation list has the ID.

The problem is that "red " does not equal "red". -color-red-p-moew works, though.

I fixed that in my remix.

Edit:

-p-moew mull does seem to work.

Yes I just discovered that earlier today, I am aware and changed the project notes. May you send me your remix?

It is not just red that does not work. Please explain this. Oh, the reason -color- did not work is because of the space. :facepalm:

https://snap.berkeley.edu/snap/snap.html#present:Username=warped%20wart%20wars&ProjectName=Snap!%20Markup%20Language&editMode&noRun

Thanks.

I just made a small fix to it.

I know. I might not use it though because I did not write it making it harder for me to edit it in the future. I might redo the code itself with reference form your code. Thanks.

Variable setters update!

-var- - creates a var
-varv(ID)- - variable setter. 
the id is assigned to variables in order of creation. the first -var- tag used is ID 1, second is 2, and so on. you can create up to 5 variables, there are only id 1-5.

all tags

-color-(color)-  - sets text color, always has to have closing tag -
-p-(text) - displays text to output
-var-
-varv-
- comment

read project notes before running project.

Why only 1-5 and not 1-∞ using

?

Well originally it was 9. But I chose to do 5. For now it works especially because there is not much to do with them yet… just fundamentals.

I attempted to replace the way that keywords and their use are stored in the compiler section of the code. Rather than


I used

(Which doesn't work, I don't know why but haven't thoroughly bug-tested yet.) The main goal was so that new words could be added easilly.
https://snap.berkeley.edu/project?user=odysseus_ssb&project=Snap!%20Markup%20Language

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.