1/** 2 * @license 3 * Copyright (C) 2006 Google Inc. 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); 6 * you may not use this file except in compliance with the License. 7 * You may obtain a copy of the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 */ 17 18/** 19 * @fileoverview 20 * Registers a language handler for Protocol Buffers as described at 21 * http://code.google.com/p/protobuf/. 22 * 23 * Based on the lexical grammar at 24 * http://research.microsoft.com/fsharp/manual/spec2.aspx#_Toc202383715 25 * 26 * @author mikesamuel@gmail.com 27 */ 28 29PR['registerLangHandler'](PR['sourceDecorator']({ 30 'keywords': ( 31 'bytes,default,double,enum,extend,extensions,false,' 32 + 'group,import,max,message,option,' 33 + 'optional,package,repeated,required,returns,rpc,service,' 34 + 'syntax,to,true'), 35 'types': /^(bool|(double|s?fixed|[su]?int)(32|64)|float|string)\b/, 36 'cStyleComments': true 37 }), ['proto']); 38