YASH (Yet Another Syntax Highligher)

This is a discussion / support forum for the Hugo programming language by Kent Tessman. Hugo is a powerful programming language for making text games / interactive fiction with multimedia support.

Hugo download links: https://www.generalcoffee.com/hugo
Roody Yogurt's Hugo Blog: https://notdeadhugo.blogspot.com
The Hugor interpreter by RealNC: http://ifwiki.org/index.php/Hugor

Moderators: Ice Cream Jonsey, joltcountry

Gerynar
Posts: 12
Joined: Tue May 11, 2010 5:50 pm
Location: Indiana
Contact:

YASH (Yet Another Syntax Highligher)

Post by Gerynar »

OK, for the one or two other people who develop Hugo games in Linux, I've got a syntax highlight definition file. It's for gedit. Just copy the file to the gtksourceview-2.0 directory. (Usually located at /usr/share/gtksourceview-2.0/language-specs).

(Fixed multi-line comments)

http://gerynarsabode.org/index.php?opti ... id=3&cid=6
Last edited by Gerynar on Fri Jul 23, 2010 5:13 pm, edited 2 times in total.

Bainespal
Posts: 151
Joined: Fri Jul 09, 2010 8:59 am

Post by Bainespal »

We're filling in the gaps in this under-represented authoring system. It's good to know that Linux and Windows users now have a couple choices of text editors to use for work on Hugo games. Even if the editors stubbornly refuse to recognize our block comments. ;-)

Gerynar
Posts: 12
Joined: Tue May 11, 2010 5:50 pm
Location: Indiana
Contact:

Post by Gerynar »

I blame the designer of the language. I mean honestly, who uses backslashes in code besides to designate a special character.

:)

Bainespal
Posts: 151
Joined: Fri Jul 09, 2010 8:59 am

Post by Bainespal »

Gerynar wrote:I blame the designer of the language. I mean honestly, who uses backslashes in code besides to designate a special character.
Maybe that is the problem. The backslash is also defined as the escape character, and the text editors can't manage to interpret both functions.

Gerynar
Posts: 12
Joined: Tue May 11, 2010 5:50 pm
Location: Indiana
Contact:

Post by Gerynar »

Not so sure, because this let's gedit also highlight special characters in strings (\n, \B, etc...) I'm thinking (and I could totally be wrong) that at least as far as gedit is concerned, it sees the !, looks through the definitions and says "ah, line comment"

User avatar
Tdarcos
Posts: 9556
Joined: Fri May 16, 2008 9:25 am
Location: Arlington, Virginia
Contact:

Post by Tdarcos »

Yeah, I agree, the game language steals so much from C that he should have just stolen /* and */ as block comments.
"When I die, I want it easy and peaceful in my sleep, like my uncle.
Not screaming and crying like his passengers."

Roody_Yogurt
Posts: 2256
Joined: Mon Apr 29, 2002 6:23 pm
Location: Milwaukee

Post by Roody_Yogurt »

Yeah, his choice of block comment code is a little strange. Since much of Hugo's design is, um, inspired by Inform 6, he probably got the exclamation-mark-as-comment from there and made up his own multi-line version.

Also, TADS has kind of always been known as the "IF system for C programmers" (which DOES use C-style comment blocks) so he might have been trying to keep away from that.

Anyhow, you can find a list of editors that handle Hugo's block comments correctly here: http://hugo.gerynarsabode.org/index.php ... ed_Editors

(I'm sure there are more out there)

Post Reply