WinAsm Studio, The Assembly IDE - Free Downloads, Source Code
Sponsors
Articles
Programming Quick Start
32-bit Assembler is Easy
Porting Iczelion tutorials
What is FASM
Hard Drive Recovery
Wiring your own LAN
Personal menu
Welcome Guest
User:
Pass:
Register!
Resend Validation Email
 
Forum
Pages (5) 1 2 3 [4] 5   ( Go to first unread post )

Syntax highlight quick guide, a quick guide to the HiEditor's syntax highlight features and usage.

akyprian
Quote Post


Administrator
******

Group: Admins
Posts: 2307
Member No.: 1
Joined: 12-May 04


bli,

QUOTE
There is still an error - the $selected variable is perfectly valid, but "selected" has been defined as a reserved "attribute" for PHP as well as HTML, when it is NOT (line 84). In any case the variable name should override the keyword/attribute definition and it should use the same colour as a normal variable.


There is no error. I do agree that the variable name should override the keyword/attribute definition and it should use the same colour as a normal variable. Here is the proof:


Attached Image
Attached Image

PMEmail PosterUsers Website
Top
akyprian
Quote Post


Administrator
******

Group: Admins
Posts: 2307
Member No.: 1
Joined: 12-May 04


QUOTE
There are no subsequent mentions of the word "for" in the file - shouldn't this last definition override any others that should cause this behaviour? Not that I can see any...


There is a dublicate of the "for" word at line 84 ([html,htm,php,php3,pl,cgi,css,jsp]). The first definition takes precedence. I 'll delete this one from the keywords.hes file. Thanks.
PMEmail PosterUsers Website
Top
akyprian
Quote Post


Administrator
******

Group: Admins
Posts: 2307
Member No.: 1
Joined: 12-May 04


QUOTE
Note the last escape slash in the line is incorrectly coloured as a delimiter, not as a string character. Although this is kind of arguable... but the first one is handled differently anyway.


HiEdit is designed to close a string when the same string opening quote is found. Escape sequences are not handled at all. So, in your example, two strings are found in the middle of which there is a \
PMEmail PosterUsers Website
Top
bli
Quote Post


New Member
*

Group: Members
Posts: 19
Member No.: 5352
Joined: 15-July 07


No, incorrect. You obviously don't know your PHP. The slash escapes the quote character so that it can be a string character, in the same way that the "\n" near the start of that string is an escape sequence that adds a newline. That is why I said that the consideration of the slash character WITHIN the string as a delimiter is arguable. It is not a string character proper, it affects the following character.

The issue is that your code does not interpret the escape slash at all, so it is incorrectly determining the end of the string. It should at the very least understand a \' combination in a single-quoted string, as well as a \" combination in a double-quoted string. As Blues would no doubt tell you, an escape slash in strings is prevalent in many languages... probably even Delphi. laugh.gif

I noted in an edit above that the "selected" behaviour was fixed using a combination of 3.0.0.4 HiEditor and 3.0.0.4 HES, it was not working with 3.0.0.3 HiEditor, which I hadn't upgraded to just then.
PMEmail Poster
Top
akyprian
Quote Post


Administrator
******

Group: Admins
Posts: 2307
Member No.: 1
Joined: 12-May 04


I do know about escape sequences very well. As already edited in my previous reply, HiEdit does not consider them at all.
PMEmail PosterUsers Website
Top
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:

Topic Options Pages (5) 1 2 3 [4] 5  Reply to this topicStart new topicStart Poll

 

Sponsors
Computer Science

Internet
C/C++
Hardware & PC maintenance

HiEditor

General Discussions
Suggestions/Bug Reports
WinAsm Studio

General Discussions
Suggestions/Bug Reports
WinAsm Studio FAQ
Multilingual User Interface
Add-Ins
Assembly Programming

Main
Newbies
Projects
Custom Controls
Snippets
Announcements & Rules

Announcements

General

Online Degrees - Distance Learning
The Heap
Russian
Google