1 /** 2 * Copyright (c) 2015, Facebook, Inc. 3 * All rights reserved. 4 * 5 * This source code is licensed under the BSD-style license found in the 6 * LICENSE file in the root directory of this source tree. An additional grant 7 * of patent rights can be found in the PATENTS file in the same directory. 8 */ 9 10 #pragma once 11 12 #ifdef __cplusplus 13 extern "C" { 14 #endif 15 16 /* Opaque type representing a generic AST node. */ 17 struct GraphQLAstNode; 18 19 /* A location in the AST. */ 20 struct GraphQLAstLocation { 21 unsigned int beginLine; 22 unsigned int beginColumn; 23 unsigned int endLine; 24 unsigned int endColumn; 25 }; 26 27 /* Fills location with location information for the given node. */ 28 void graphql_node_get_location(const struct GraphQLAstNode *node, 29 struct GraphQLAstLocation *location); 30 31 void graphql_node_free(struct GraphQLAstNode *node); 32 33 #ifdef __cplusplus 34 } 35 #endif 36