]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/m2/gm2-compiler/M2Check.def
Update copyright years.
[thirdparty/gcc.git] / gcc / m2 / gm2-compiler / M2Check.def
CommitLineData
1eee94d3
GM
1(* M2Check.def perform rigerous type checking for fully declared symbols.
2
83ffe9cd 3Copyright (C) 2020-2023 Free Software Foundation, Inc.
1eee94d3
GM
4Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
5
6This file is part of GNU Modula-2.
7
8GNU Modula-2 is free software; you can redistribute it and/or modify
9it under the terms of the GNU General Public License as published by
10the Free Software Foundation; either version 3, or (at your option)
11any later version.
12
13GNU Modula-2 is distributed in the hope that it will be useful, but
14WITHOUT ANY WARRANTY; without even the implied warranty of
15MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16General Public License for more details.
17
18You should have received a copy of the GNU General Public License
19along with GNU Modula-2; see the file COPYING3. If not see
20<http://www.gnu.org/licenses/>. *)
21
22DEFINITION MODULE M2Check ;
23
24(*
25 Title : M2Check
26 Author : Gaius Mulley
27 System : GNU Modula-2
28 Date : Fri Mar 6 15:32:10 2020
29 Revision : $Version$
30 Description: provides a module to check the symbol type compatibility.
31 It assumes that the declaration of all dependants
32 is complete.
33*)
34
35
36(*
37 ParameterTypeCompatible - returns TRUE if the nth procedure parameter formal
38 is compatible with actual. If the string is empty then
39 no error is issued.
40*)
41
42PROCEDURE ParameterTypeCompatible (token: CARDINAL; format: ARRAY OF CHAR;
43 procedure, formal, actual, nth: CARDINAL;
44 isvar: BOOLEAN) : BOOLEAN ;
45
46
47(*
48 AssignmentTypeCompatible - returns TRUE if the des and the expr are assignment compatible.
49 If the string is empty then no error is issued.
50*)
51
52PROCEDURE AssignmentTypeCompatible (token: CARDINAL; format: ARRAY OF CHAR;
53 des, expr: CARDINAL) : BOOLEAN ;
54
55
56(*
57 ExpressionTypeCompatible - returns TRUE if the expressions, left and right,
58 are expression compatible.
59 If the string is empty then no error is issued.
60*)
61
62PROCEDURE ExpressionTypeCompatible (token: CARDINAL; format: ARRAY OF CHAR;
63 left, right: CARDINAL;
64 strict, isin: BOOLEAN) : BOOLEAN ;
65
66
67END M2Check.