|
Revision 428, 1.2 kB
(checked in by walter, 2 years ago)
|
remove tabs, any trailing spaces
|
- Property svn:eol-style set to
native
|
| Line | |
|---|
| 1 |
// Compiler implementation of the D programming language |
|---|
| 2 |
// Copyright (c) 1999-2006 by Digital Mars |
|---|
| 3 |
// All Rights Reserved |
|---|
| 4 |
// written by Walter Bright |
|---|
| 5 |
// http://www.digitalmars.com |
|---|
| 6 |
// License for redistribution is by either the Artistic License |
|---|
| 7 |
// in artistic.txt, or the GNU General Public License in gnu.txt. |
|---|
| 8 |
// See the included readme.txt for details. |
|---|
| 9 |
|
|---|
| 10 |
#ifndef DMD_MACRO_H |
|---|
| 11 |
#define DMD_MACRO_H 1 |
|---|
| 12 |
|
|---|
| 13 |
#include <stdio.h> |
|---|
| 14 |
#include <string.h> |
|---|
| 15 |
#include <time.h> |
|---|
| 16 |
#include <ctype.h> |
|---|
| 17 |
|
|---|
| 18 |
#include "root.h" |
|---|
| 19 |
|
|---|
| 20 |
|
|---|
| 21 |
class Macro |
|---|
| 22 |
{ |
|---|
| 23 |
Macro *next; // next in list |
|---|
| 24 |
|
|---|
| 25 |
unsigned char *name; // macro name |
|---|
| 26 |
size_t namelen; // length of macro name |
|---|
| 27 |
|
|---|
| 28 |
unsigned char *text; // macro replacement text |
|---|
| 29 |
size_t textlen; // length of replacement text |
|---|
| 30 |
|
|---|
| 31 |
int inuse; // macro is in use (don't expand) |
|---|
| 32 |
|
|---|
| 33 |
Macro(unsigned char *name, size_t namelen, unsigned char *text, size_t textlen); |
|---|
| 34 |
Macro *search(unsigned char *name, size_t namelen); |
|---|
| 35 |
|
|---|
| 36 |
public: |
|---|
| 37 |
static Macro *define(Macro **ptable, unsigned char *name, size_t namelen, unsigned char *text, size_t textlen); |
|---|
| 38 |
|
|---|
| 39 |
void expand(OutBuffer *buf, unsigned start, unsigned *pend, |
|---|
| 40 |
unsigned char *arg, unsigned arglen); |
|---|
| 41 |
}; |
|---|
| 42 |
|
|---|
| 43 |
#endif |
|---|