]>
git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/m2/gm2-gcc/m2linemap.h
1 /* m2linemap.h header file for m2linemap.cc.
3 Copyright (C) 2012-2024 Free Software Foundation, Inc.
4 Contributed by Gaius Mulley <gaius@glam.ac.uk>.
6 This file is part of GNU Modula-2.
8 GNU Modula-2 is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 3, or (at your option)
13 GNU Modula-2 is distributed in the hope that it will be useful, but
14 WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with GNU Modula-2; see the file COPYING3. If not see
20 <http://www.gnu.org/licenses/>. */
22 #if !defined(m2linemap_h)
27 #if defined(m2linemap_c)
29 #define EXTERN extern "C"
30 #else /* !__cplusplus. */
32 #endif /*!__cplusplus. */
33 #else /* !m2linemap_c. */
35 #define EXTERN extern "C"
36 #else /* !__cplusplus. */
38 #endif /* !__cplusplus. */
39 #endif /* !m2linemap_c. */
41 EXTERN
void m2linemap_StartFile (void *filename
, unsigned int linebegin
);
42 EXTERN
void m2linemap_EndFile (void);
43 EXTERN
void m2linemap_StartLine (unsigned int linenumber
,
44 unsigned int linesize
);
45 EXTERN location_t
m2linemap_GetLocationColumn (unsigned int column
);
46 EXTERN location_t
m2linemap_GetLocationRange (unsigned int start
, unsigned int end
);
47 EXTERN location_t
m2linemap_GetLocationBinary (location_t caret
,
48 location_t start
, location_t finish
);
50 EXTERN location_t
m2linemap_UnknownLocation (void);
51 EXTERN location_t
m2linemap_BuiltinsLocation (void);
53 EXTERN location_t
m2linemap_GetLocationColumn (unsigned int column
);
54 EXTERN
int m2linemap_GetLineNoFromLocation (location_t location
);
55 EXTERN
int m2linemap_GetColumnNoFromLocation (location_t location
);
56 EXTERN
const char *m2linemap_GetFilenameFromLocation (location_t location
);
57 EXTERN
void m2linemap_ErrorAt (location_t location
, char *message
);
58 EXTERN
void m2linemap_ErrorAtf (location_t location
, const char *message
);
59 EXTERN
void m2linemap_WarningAtf (location_t location
, const char *message
);
60 EXTERN
void m2linemap_NoteAtf (location_t location
, const char *message
);
61 EXTERN
void m2linemap_internal_error (const char *message
);
62 EXTERN
void m2linemap_internal_error_at (location_t location
, const char *fmt
, ...);
64 EXTERN location_t
UnknownLocation (void);
65 EXTERN location_t
BuiltinsLocation (void);
66 EXTERN
void ErrorAt (location_t location
, char *message
);
67 EXTERN
void ErrorAtf (location_t location
, const char *message
, ...);
68 EXTERN
void WarningAtf (location_t location
, const char *message
, ...);
69 EXTERN
void NoteAtf (location_t location
, const char *message
, ...);
72 #endif /* m2linemap_h. */