@@ -3,8 +3,8 @@ import * as fs from "fs";
33import * as path from "path" ;
44import fetch from "isomorphic-fetch" ;
55
6- const lspVersion = "3.15 .0" ;
7- const lspRepoRevision = "66cf1d7908f6548c8262b82572c51c7d029dfbdf " ;
6+ const lspVersion = "3.16 .0" ;
7+ const lspRepoRevision = "b8e6fead8c011ee4ca6547cc421dd41e3a4c3028 " ;
88const rootDir = path . normalize ( path . join ( __dirname , ".." ) ) ;
99const tempDir = path . join ( rootDir , "tmp" ) ;
1010const protocolMdPath = path . join ( tempDir , lspRepoRevision , "protocol.md" ) ;
@@ -24,7 +24,7 @@ const createFile = (filePath: string, content: string) => {
2424} ;
2525
2626const extractTypeScriptSource = ( content : string ) => {
27- const regEx = / ^ ` ` ` t y p e s c r i p t \r \n ( [ ^ ] * ?) ^ ` ` ` \r \n / gm;
27+ const regEx = / ^ ` ` ` t y p e s c r i p t \r ? \n ( [ ^ ] * ?) ^ ` ` ` \r ? \n / gm;
2828 let match ;
2929 let result = "" ;
3030
@@ -241,6 +241,9 @@ Handlebars.registerHelper("local_var", (s) => {
241241Handlebars . registerHelper ( "const" , ( s ) => {
242242 return snake ( s ) . toUpperCase ( ) ;
243243} ) ;
244+ Handlebars . registerHelper ( "isliteral" , ( s : string ) => {
245+ return s . match ( / ' .* ' / ) || s . match ( / " .* " / ) || s . match ( / \d + / ) ;
246+ } ) ;
244247
245248( async ( ) => {
246249 if ( ! fs . existsSync ( protocolMdPath ) ) {
@@ -362,7 +365,11 @@ module LanguageServer
362365{{comment documentation indent=8}}
363366 #
364367 {{/if}}
368+ {{#if (isliteral value)}}
365369 {{const name}} = {{value}}
370+ {{else}}
371+ {{const name}} = {{const value}}
372+ {{/if}}
366373 {{/each}}
367374 end
368375 end
0 commit comments