Home | History | Annotate | Download | only in proto
      1 /*
      2  * Copyright 2015 Google Inc. All rights reserved.
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *   http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13  * See the License for the specific language governing permissions and
     14  * limitations under the License.
     15  */
     16 
     17 syntax = "proto3";
     18 
     19 package kythe.proto.common;
     20 
     21 // Fact represents a single key/value fact from the graph.
     22 message Fact {
     23   string name = 1;
     24   bytes value = 2;
     25 }
     26 
     27 // A Point represents a location within a file or buffer.
     28 //
     29 // If line_number  0, the line number and column offset are considered
     30 // unknown and will be ignored.
     31 //
     32 // A point with line_number > 0 is said to be _normalized_ if it satisfies
     33 // the constraint 0  column_offset  bytelen(line_number); that is, if the
     34 // column_offset is within the actual range of the corresponding line.  A
     35 // point can be normalized by adjusting line_number and column_offset so that
     36 // this constraint is satisfied.  This may be impossible if the column offset
     37 // exceeds the bounds of the file.
     38 message Point {
     39   int32 byte_offset = 1;
     40   int32 line_number = 2;
     41   int32 column_offset = 3;
     42 }
     43 
     44 // A Span represents an inclusive-exclusive range inside of a file or buffer.
     45 message Span {
     46   Point start = 1;
     47   Point end = 2;
     48 }
     49