summary refs log tree commit diff stats
path: root/nim/msgs.pas
diff options
context:
space:
mode:
Diffstat (limited to 'nim/msgs.pas')
-rw-r--r--nim/msgs.pas66
1 files changed, 34 insertions, 32 deletions
diff --git a/nim/msgs.pas b/nim/msgs.pas
index a91c328ef..0eb1651d9 100644
--- a/nim/msgs.pas
+++ b/nim/msgs.pas
@@ -278,6 +278,7 @@ type
     errXRequiresOneArgument,
     errUnhandledExceptionX,
     errCyclicTree,
+    errXisNoMacroOrTemplate,
     errUser,
     warnCannotOpenFile,
     warnOctalEscape,
@@ -491,7 +492,7 @@ const
     '$1 here not allowed',
     'invalid control flow: $1',
     'a type has no value',
-    '''$1'' is no type',
+    'invalid type: ''$1''',
     '''^'' needs a pointer or reference type',
     'invalid context for builtin ''$1''',
     'invalid expression',
@@ -536,6 +537,7 @@ const
     'converter requires one parameter',
     'unhandled exception: $1',
     'macro returned a cyclic abstract syntax tree',
+    '''$1'' is no macro or template',
     '$1',
     'cannot open ''$1'' [CannotOpenFile]',
     'octal escape sequences do not exist; leading zero is ignored [OctalEscape]',
@@ -645,8 +647,8 @@ const // this format is understood by many text editors: it is the same that
 procedure MessageOut(const s: string);

 

 procedure rawMessage(const msg: TMsgKind; const arg: string = ''); overload;

-procedure rawMessage(const msg: TMsgKind; const args: array of string); overload;
-
+procedure rawMessage(const msg: TMsgKind; const args: array of string); overload;

+

 procedure liMessage(const info: TLineInfo; const msg: TMsgKind;

                     const arg: string = '');

 

@@ -840,37 +842,37 @@ begin
                              getMessageStr(errInstantiationFrom, '')]));

   end;

 end;

-
-procedure rawMessage(const msg: TMsgKind; const args: array of string);
-var
-  frmt: string;
-begin
-  case msg of
-    errMin..errMax: begin
-      writeContext();
-      frmt := rawErrorFormat;
-    end;
-    warnMin..warnMax: begin
-      if not (optWarns in gOptions) then exit;
-      if not (msg in gNotes) then exit;
-      frmt := rawWarningFormat;
-      inc(gWarnCounter);
-    end;
-    hintMin..hintMax: begin
-      if not (optHints in gOptions) then exit;
-      if not (msg in gNotes) then exit;
-      frmt := rawHintFormat;
-      inc(gHintCounter);
-    end;
-    else assert(false) // cannot happen
-  end;
-  MessageOut(Format(frmt, format(msgKindToString(msg), args)));
-  handleError(msg);
-end;
+

+procedure rawMessage(const msg: TMsgKind; const args: array of string);

+var

+  frmt: string;

+begin

+  case msg of

+    errMin..errMax: begin

+      writeContext();

+      frmt := rawErrorFormat;

+    end;

+    warnMin..warnMax: begin

+      if not (optWarns in gOptions) then exit;

+      if not (msg in gNotes) then exit;

+      frmt := rawWarningFormat;

+      inc(gWarnCounter);

+    end;

+    hintMin..hintMax: begin

+      if not (optHints in gOptions) then exit;

+      if not (msg in gNotes) then exit;

+      frmt := rawHintFormat;

+      inc(gHintCounter);

+    end;

+    else assert(false) // cannot happen

+  end;

+  MessageOut(Format(frmt, format(msgKindToString(msg), args)));

+  handleError(msg);

+end;

 

 procedure rawMessage(const msg: TMsgKind; const arg: string = '');

-begin
-  rawMessage(msg, [arg]);
+begin

+  rawMessage(msg, [arg]);

 end;

 

 procedure liMessage(const info: TLineInfo; const msg: TMsgKind;