gfx/angle/src/compiler/preprocessor/Preprocessor.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gfx/angle/src/compiler/preprocessor/Preprocessor.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,51 @@
     1.4 +//
     1.5 +// Copyright (c) 2011 The ANGLE Project Authors. All rights reserved.
     1.6 +// Use of this source code is governed by a BSD-style license that can be
     1.7 +// found in the LICENSE file.
     1.8 +//
     1.9 +
    1.10 +#ifndef COMPILER_PREPROCESSOR_PREPROCESSOR_H_
    1.11 +#define COMPILER_PREPROCESSOR_PREPROCESSOR_H_
    1.12 +
    1.13 +#include <stddef.h>
    1.14 +
    1.15 +#include "pp_utils.h"
    1.16 +
    1.17 +namespace pp
    1.18 +{
    1.19 +
    1.20 +class Diagnostics;
    1.21 +class DirectiveHandler;
    1.22 +struct PreprocessorImpl;
    1.23 +struct Token;
    1.24 +
    1.25 +class Preprocessor
    1.26 +{
    1.27 +  public:
    1.28 +    Preprocessor(Diagnostics* diagnostics, DirectiveHandler* directiveHandler);
    1.29 +    ~Preprocessor();
    1.30 +
    1.31 +    // count: specifies the number of elements in the string and length arrays.
    1.32 +    // string: specifies an array of pointers to strings.
    1.33 +    // length: specifies an array of string lengths.
    1.34 +    // If length is NULL, each string is assumed to be null terminated.
    1.35 +    // If length is a value other than NULL, it points to an array containing
    1.36 +    // a string length for each of the corresponding elements of string.
    1.37 +    // Each element in the length array may contain the length of the
    1.38 +    // corresponding string or a value less than 0 to indicate that the string
    1.39 +    // is null terminated.
    1.40 +    bool init(size_t count, const char* const string[], const int length[]);
    1.41 +    // Adds a pre-defined macro.
    1.42 +    void predefineMacro(const char* name, int value);
    1.43 +
    1.44 +    void lex(Token* token);
    1.45 +
    1.46 +  private:
    1.47 +    PP_DISALLOW_COPY_AND_ASSIGN(Preprocessor);
    1.48 +
    1.49 +    PreprocessorImpl* mImpl;
    1.50 +};
    1.51 +
    1.52 +}  // namespace pp
    1.53 +#endif  // COMPILER_PREPROCESSOR_PREPROCESSOR_H_
    1.54 +

mercurial