kythe.io@v0.0.68-0.20240422202219-7225dbc01741/kythe/proto/filecontext.proto (about) 1 /* 2 * Copyright 2016 The Kythe Authors. 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; 20 21 option go_package = "kythe.io/kythe/proto/filecontext_go_proto"; 22 option java_package = "com.google.devtools.kythe.proto"; 23 24 // ContextDependentVersion columns and rows define a table that relates input 25 // contexts (keyed by a single source context per row) to tuples of (byte 26 // offset * linked context). When a file F being processed in context C refers 27 // to another file F' at offset O (perhaps because F has an #include directive 28 // at O) the context in which F' should be processed is the linked context 29 // derived from this table. 30 message ContextDependentVersion { 31 message Column { 32 // The byte offset into the file resource. 33 int32 offset = 1; 34 // The signature for the resulting context. 35 string linked_context = 2; 36 } 37 38 // See ContextDependentVersionColumn for details. It is valid for a Row to 39 // have no columns. In this case, the associated file was seen to exist in 40 // some context C, but did not refer to any other files while in that 41 // context. 42 message Row { 43 // The context to be applied to all columns. 44 string source_context = 1; 45 // A map from byte offsets to linked contexts. 46 repeated Column column = 2; 47 // If true, this version should always be processed regardless of any 48 // claiming. 49 bool always_process = 3; 50 } 51 52 repeated Row row = 1; 53 }