aboutsummaryrefslogtreecommitdiff
path: root/frontend/checksupport.icl
diff options
context:
space:
mode:
authorjohnvg2003-12-16 16:19:53 +0000
committerjohnvg2003-12-16 16:19:53 +0000
commit0f12d287c6e16925e49ccc576ae7ae7defa5ea94 (patch)
tree6afbbb477781a28d0c5b2c7ca407df2bb70b5295 /frontend/checksupport.icl
parentremove VoidTypeToken (diff)
add CheckWarningWithPosition
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1439 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
Diffstat (limited to 'frontend/checksupport.icl')
-rw-r--r--frontend/checksupport.icl11
1 files changed, 7 insertions, 4 deletions
diff --git a/frontend/checksupport.icl b/frontend/checksupport.icl
index 77aa745..a737178 100644
--- a/frontend/checksupport.icl
+++ b/frontend/checksupport.icl
@@ -168,7 +168,7 @@ where
popErrorAdmin cs=:{cs_error}
= {cs & cs_error = popErrorAdmin cs_error } //...PK
-newPosition :: !Ident !Position -> IdentPos
+newPosition :: !Ident !Position -> IdentPos
newPosition id (FunPos file_name line_nr _)
= { ip_ident = id, ip_line = line_nr, ip_file = file_name }
newPosition id (LinePos file_name line_nr)
@@ -190,10 +190,14 @@ checkWarning id mess error=:{ea_file,ea_loc=[]}
checkWarning id mess error=:{ea_file,ea_loc}
= { error & ea_file = ea_file <<< "Warning " <<< hd ea_loc <<< ": " <<< id <<< " " <<< mess <<< '\n' }
-
checkErrorWithIdentPos :: !IdentPos !a !*ErrorAdmin -> .ErrorAdmin | <<< a;
checkErrorWithIdentPos ident_pos mess error=:{ea_file}
- = { error & ea_file = ea_file <<< "Error " <<< ident_pos <<< ":" <<< mess <<< '\n', ea_ok = False }
+ = { error & ea_file = ea_file <<< "Error " <<< ident_pos <<< ": " <<< mess <<< '\n', ea_ok = False }
+
+checkWarningWithPosition :: !Ident !Position !a !*ErrorAdmin -> .ErrorAdmin | <<< a;
+checkWarningWithPosition ident pos mess error=:{ea_file}
+ # ident_pos = newPosition ident pos
+ = { error & ea_file = ea_file <<< "Warning " <<< ident_pos <<< ": " <<< mess <<< '\n' }
class envLookUp a :: !a !(Env Ident .b) -> (!Bool,.b)
@@ -645,7 +649,6 @@ where
| ip_line == cNotALineNumber
= file <<< '[' <<< ip_file <<< ',' <<< ip_ident <<< ']'
= file <<< '[' <<< ip_file <<< ',' <<< ip_line <<< ',' <<< ip_ident <<< ']'
-
instance <<< ExplImpInfo
where