Kiwi Engine
VM for interpreter
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
KELineInfo.h
Go to the documentation of this file.
1 
8 #ifndef KELINEINFO_H
9 #define KELINEINFO_H
10 
11 #include <Coconut/Coconut.h>
12 
14 static const unsigned int KEUnknownLineNumber = (unsigned int) -1 ;
15 
19 struct KELineInfo {
21  struct CNObject superClass ;
23  struct CNString * fileName ;
25  unsigned int lineNumber ;
26 } ;
27 
36 struct KELineInfo *
37 KEAllocateLineInfo(struct CNString * fname, unsigned int lineno, struct CNResource * resource) ;
38 
43 static inline void
44 KERetainLineInfo(struct KELineInfo * dst)
45 {
46  CNRetainObject(&(dst->superClass)) ;
47 }
48 
53 static inline void
54 KEReleaseLineInfo(struct KELineInfo * dst)
55 {
56  CNReleaseObject(&(dst->superClass)) ;
57 }
58 
65 static inline struct CNString *
66 KEFileNameInLineInfo(struct KELineInfo * src)
67 {
68  return src->fileName ;
69 }
70 
77 static inline unsigned int
78 KELineNumberInLineInfo(struct KELineInfo * src)
79 {
80  return src->lineNumber ;
81 }
82 
83 #endif /* KELINEINFO_H */
84 
KEProgram class.
Definition: KELineInfo.h:19
struct CNObject superClass
Definition: KELineInfo.h:21
unsigned int lineNumber
Definition: KELineInfo.h:25
struct KELineInfo * KEAllocateLineInfo(struct CNString *fname, unsigned int lineno, struct CNResource *resource)
Allocate KELineInfo object.
struct CNString * fileName
Definition: KELineInfo.h:23