[SCM] Lisaac compiler branch, mildred-coverage-rebase, updated. lisaac-0.12-642-g4389c6a
Mildred Ki'Lya
silkensedai at online.fr
Sat Aug 14 17:22:02 UTC 2010
The following commit has been merged in the mildred-coverage-rebase branch:
commit 4389c6a69e396809a40198226ffa045bd87f8b58
Author: Mildred Ki'Lya <silkensedai at online.fr>
Date: Sat Aug 14 18:14:46 2010 +0200
Fix TYPE.parse_type_c
diff --git a/src/type/type.li b/src/type/type.li
index e88fdc5..8dbde3b 100644
--- a/src/type/type.li
+++ b/src/type/type.li
@@ -1323,14 +1323,19 @@ Section TYPE,PROTOTYPE
Section Private
- parse_type_c t:ABSTRACT_STRING :BOOLEAN <-
+ // Return TRUE if `type_c' contains the word `t' and `t' is not followed or
+ // does not follow an identifier character [A-Za-z0-9_]
( + idx,idx2:INTEGER;
+ result:BOOLEAN;
- idx := type_c.first_substring_index t;
+ idx := type_c.first_substring_index t;
(idx != 0).if {
- ((idx=1) || {!type_c.item (idx - 1).is_letter_or_digit} || {!type_c.item (idx - 1) != '_'}).if {
- idx2 := idx + type_c.count;
+ // t was found
+ ((idx=1) || {!type_c.item (idx - 1).is_letter_or_digit} || {type_c.item (idx - 1) != '_'}).if {
+ // t starts the identifier
+ idx2 := idx + t.count;
result := (
- (idx2>type_c.upper) || {!type_c.item idx2.is_letter_or_digit} || {!type_c.item idx2 != '_'}
+ // and t ends the identifier
+ (idx2>type_c.upper) || {!type_c.item idx2.is_letter_or_digit} || {type_c.item idx2 != '_'}
);
};
};
--
Lisaac compiler
More information about the Lisaac-commits
mailing list