@@ -11,6 +11,8 @@ use lsp_types::{
11
11
12
12
use crate :: grammar:: parsing:: { get_quickbms_language, parse, PointLike , RangeLike } ;
13
13
14
+ use crate :: server:: keyword_docs:: get_keyword_docs;
15
+
14
16
pub struct ServerState {
15
17
files : HashMap < Url , ( String , Tree ) > ,
16
18
keyword_docs : HashMap < String , String > ,
@@ -363,191 +365,3 @@ impl ServerState {
363
365
Some ( folding_ranges)
364
366
}
365
367
}
366
-
367
- pub fn get_keyword_docs ( ) -> HashMap < String , String > {
368
- [
369
- (
370
- "print" . to_string ( ) ,
371
- include_str ! ( "keyword_docs/print.txt" ) . to_string ( ) ,
372
- ) ,
373
- (
374
- "set" . to_string ( ) ,
375
- include_str ! ( "keyword_docs/set.txt" ) . to_string ( ) ,
376
- ) ,
377
- (
378
- "startfunction" . to_string ( ) ,
379
- include_str ! ( "keyword_docs/functions.txt" ) . to_string ( ) ,
380
- ) ,
381
- (
382
- "endfunction" . to_string ( ) ,
383
- include_str ! ( "keyword_docs/functions.txt" ) . to_string ( ) ,
384
- ) ,
385
- (
386
- "callfunction" . to_string ( ) ,
387
- include_str ! ( "keyword_docs/functions.txt" ) . to_string ( ) ,
388
- ) ,
389
- (
390
- "endian" . to_string ( ) ,
391
- include_str ! ( "keyword_docs/endian.txt" ) . to_string ( ) ,
392
- ) ,
393
- (
394
- "idstring" . to_string ( ) ,
395
- include_str ! ( "keyword_docs/idstring.txt" ) . to_string ( ) ,
396
- ) ,
397
- (
398
- "if" . to_string ( ) ,
399
- include_str ! ( "keyword_docs/if.txt" ) . to_string ( ) ,
400
- ) ,
401
- (
402
- "elif" . to_string ( ) ,
403
- include_str ! ( "keyword_docs/if.txt" ) . to_string ( ) ,
404
- ) ,
405
- (
406
- "else" . to_string ( ) ,
407
- include_str ! ( "keyword_docs/if.txt" ) . to_string ( ) ,
408
- ) ,
409
- (
410
- "endif" . to_string ( ) ,
411
- include_str ! ( "keyword_docs/if.txt" ) . to_string ( ) ,
412
- ) ,
413
- (
414
- "goto" . to_string ( ) ,
415
- include_str ! ( "keyword_docs/goto.txt" ) . to_string ( ) ,
416
- ) ,
417
- (
418
- "for" . to_string ( ) ,
419
- include_str ! ( "keyword_docs/for.txt" ) . to_string ( ) ,
420
- ) ,
421
- (
422
- "next" . to_string ( ) ,
423
- include_str ! ( "keyword_docs/for.txt" ) . to_string ( ) ,
424
- ) ,
425
- (
426
- "break" . to_string ( ) ,
427
- include_str ! ( "keyword_docs/label.txt" ) . to_string ( ) ,
428
- ) ,
429
- (
430
- "continue" . to_string ( ) ,
431
- include_str ! ( "keyword_docs/label.txt" ) . to_string ( ) ,
432
- ) ,
433
- (
434
- "cleanexit" . to_string ( ) ,
435
- include_str ! ( "keyword_docs/cleanexit.txt" ) . to_string ( ) ,
436
- ) ,
437
- (
438
- "findloc" . to_string ( ) ,
439
- include_str ! ( "keyword_docs/findloc.txt" ) . to_string ( ) ,
440
- ) ,
441
- (
442
- "get" . to_string ( ) ,
443
- include_str ! ( "keyword_docs/get.txt" ) . to_string ( ) ,
444
- ) ,
445
- (
446
- "math" . to_string ( ) ,
447
- include_str ! ( "keyword_docs/math.txt" ) . to_string ( ) ,
448
- ) ,
449
- (
450
- "log" . to_string ( ) ,
451
- include_str ! ( "keyword_docs/log.txt" ) . to_string ( ) ,
452
- ) ,
453
- (
454
- "asize" . to_string ( ) ,
455
- include_str ! ( "keyword_docs/asize.txt" ) . to_string ( ) ,
456
- ) ,
457
- (
458
- "long" . to_string ( ) ,
459
- include_str ! ( "keyword_docs/long.txt" ) . to_string ( ) ,
460
- ) ,
461
- (
462
- "string" . to_string ( ) ,
463
- include_str ! ( "keyword_docs/string.txt" ) . to_string ( ) ,
464
- ) ,
465
- (
466
- "getarray" . to_string ( ) ,
467
- include_str ! ( "keyword_docs/getarray.txt" ) . to_string ( ) ,
468
- ) ,
469
- (
470
- "putarray" . to_string ( ) ,
471
- include_str ! ( "keyword_docs/getarray.txt" ) . to_string ( ) ,
472
- ) ,
473
- (
474
- "encryption" . to_string ( ) ,
475
- include_str ! ( "keyword_docs/encryption.txt" ) . to_string ( ) ,
476
- ) ,
477
- (
478
- "reverseshort" . to_string ( ) ,
479
- include_str ! ( "keyword_docs/reverseshort.txt" ) . to_string ( ) ,
480
- ) ,
481
- (
482
- "reverselong" . to_string ( ) ,
483
- include_str ! ( "keyword_docs/reverselong.txt" ) . to_string ( ) ,
484
- ) ,
485
- (
486
- "reverselonglong" . to_string ( ) ,
487
- include_str ! ( "keyword_docs/reverselonglong.txt" ) . to_string ( ) ,
488
- ) ,
489
- (
490
- "filexor" . to_string ( ) ,
491
- include_str ! ( "keyword_docs/filexor.txt" ) . to_string ( ) ,
492
- ) ,
493
- (
494
- "append" . to_string ( ) ,
495
- include_str ! ( "keyword_docs/append.txt" ) . to_string ( ) ,
496
- ) ,
497
- (
498
- "getvarchr" . to_string ( ) ,
499
- include_str ! ( "keyword_docs/getvarchr.txt" ) . to_string ( ) ,
500
- ) ,
501
- (
502
- "putvarchr" . to_string ( ) ,
503
- include_str ! ( "keyword_docs/putvarchr.txt" ) . to_string ( ) ,
504
- ) ,
505
- (
506
- "byte" . to_string ( ) ,
507
- include_str ! ( "keyword_docs/byte.txt" ) . to_string ( ) ,
508
- ) ,
509
- (
510
- "comtype" . to_string ( ) ,
511
- include_str ! ( "keyword_docs/comtype.txt" ) . to_string ( ) ,
512
- ) ,
513
- (
514
- "clog" . to_string ( ) ,
515
- include_str ! ( "keyword_docs/clog.txt" ) . to_string ( ) ,
516
- ) ,
517
- (
518
- "padding" . to_string ( ) ,
519
- include_str ! ( "keyword_docs/padding.txt" ) . to_string ( ) ,
520
- ) ,
521
- (
522
- "savepos" . to_string ( ) ,
523
- include_str ! ( "keyword_docs/savepos.txt" ) . to_string ( ) ,
524
- ) ,
525
- (
526
- "extension" . to_string ( ) ,
527
- include_str ! ( "keyword_docs/extension.txt" ) . to_string ( ) ,
528
- ) ,
529
- (
530
- "getdstring" . to_string ( ) ,
531
- include_str ! ( "keyword_docs/getdstring.txt" ) . to_string ( ) ,
532
- ) ,
533
- (
534
- "do" . to_string ( ) ,
535
- include_str ! ( "keyword_docs/do.txt" ) . to_string ( ) ,
536
- ) ,
537
- (
538
- "while" . to_string ( ) ,
539
- include_str ! ( "keyword_docs/do.txt" ) . to_string ( ) ,
540
- ) ,
541
- (
542
- "short" . to_string ( ) ,
543
- include_str ! ( "keyword_docs/short.txt" ) . to_string ( ) ,
544
- ) ,
545
- (
546
- "open" . to_string ( ) ,
547
- include_str ! ( "keyword_docs/open.txt" ) . to_string ( ) ,
548
- ) ,
549
- ]
550
- . iter ( )
551
- . cloned ( )
552
- . collect ( )
553
- }
0 commit comments