//===--- Action.h - Parser Action Interface ---------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file defines the Action and EmptyAction interface.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_CLANG_PARSE_ACTION_H
#define LLVM_CLANG_PARSE_ACTION_H
#include "clang/Basic/IdentifierTable.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Basic/TypeTraits.h"
#include "clang/Parse/AccessSpecifier.h"
#include "clang/Parse/Ownership.h"
namespace clang {
// Semantic.
class DeclSpec;
class ObjCDeclSpec;
class CXXScopeSpec;
class Declarator;
class AttributeList;
struct FieldDeclarator;
// Parse.
class Scope;
class Action;
class Selector;
class Designation;
class InitListDesignations;
// Lex.
class Preprocessor;
class Token;
// We can re-use the low bit of expression, statement, base, and
// member-initializer pointers for the "invalid" flag of
// ActionResult.
template<> struct IsResultPtrLowBitFree<0> { static const bool value = true; };
template<> struct IsResultPtrLowBitFree<1> { static const bool value = true; };
template<> struct IsResultPtrLowBitFree<3> { static const bool value = true; };
template<> struct IsResultPtrLowBitFree<4> { static const bool value = true; };
/// Action - As the parser reads the input file and recognizes the productions
/// of the grammar, it invokes methods on this class to turn the parsed input
/// into something useful: e.g. a parse tree.
///
/// The callback methods that this class provides are phrased as actions that
/// the parser has just done or is about to do when the method is called. They
/// are not requests that the actions module do the specified action.
///
/// All of the methods here are optional except getTypeName() and
/// isCurrentClassName(), which must be specified in order for the
/// parse to complete accurately. The MinimalAction class does this
/// bare-minimum of tracking to implement this functionality.
class Action :