Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move keyword docs code into separate file
To make the state file less bloated.
- Loading branch information
1 parent
f6b2c4d
commit 6e884ba
Showing
3 changed files
with
192 additions
and
188 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ pub mod grammar { | |
} | ||
|
||
pub mod server { | ||
pub mod keyword_docs; | ||
pub mod server; | ||
pub mod state; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,189 @@ | ||
use std::collections::HashMap; | ||
|
||
pub fn get_keyword_docs() -> HashMap<String, String> { | ||
[ | ||
( | ||
"print".to_string(), | ||
include_str!("keyword_docs/print.txt").to_string(), | ||
), | ||
( | ||
"set".to_string(), | ||
include_str!("keyword_docs/set.txt").to_string(), | ||
), | ||
( | ||
"startfunction".to_string(), | ||
include_str!("keyword_docs/functions.txt").to_string(), | ||
), | ||
( | ||
"endfunction".to_string(), | ||
include_str!("keyword_docs/functions.txt").to_string(), | ||
), | ||
( | ||
"callfunction".to_string(), | ||
include_str!("keyword_docs/functions.txt").to_string(), | ||
), | ||
( | ||
"endian".to_string(), | ||
include_str!("keyword_docs/endian.txt").to_string(), | ||
), | ||
( | ||
"idstring".to_string(), | ||
include_str!("keyword_docs/idstring.txt").to_string(), | ||
), | ||
( | ||
"if".to_string(), | ||
include_str!("keyword_docs/if.txt").to_string(), | ||
), | ||
( | ||
"elif".to_string(), | ||
include_str!("keyword_docs/if.txt").to_string(), | ||
), | ||
( | ||
"else".to_string(), | ||
include_str!("keyword_docs/if.txt").to_string(), | ||
), | ||
( | ||
"endif".to_string(), | ||
include_str!("keyword_docs/if.txt").to_string(), | ||
), | ||
( | ||
"goto".to_string(), | ||
include_str!("keyword_docs/goto.txt").to_string(), | ||
), | ||
( | ||
"for".to_string(), | ||
include_str!("keyword_docs/for.txt").to_string(), | ||
), | ||
( | ||
"next".to_string(), | ||
include_str!("keyword_docs/for.txt").to_string(), | ||
), | ||
( | ||
"break".to_string(), | ||
include_str!("keyword_docs/label.txt").to_string(), | ||
), | ||
( | ||
"continue".to_string(), | ||
include_str!("keyword_docs/label.txt").to_string(), | ||
), | ||
( | ||
"cleanexit".to_string(), | ||
include_str!("keyword_docs/cleanexit.txt").to_string(), | ||
), | ||
( | ||
"findloc".to_string(), | ||
include_str!("keyword_docs/findloc.txt").to_string(), | ||
), | ||
( | ||
"get".to_string(), | ||
include_str!("keyword_docs/get.txt").to_string(), | ||
), | ||
( | ||
"math".to_string(), | ||
include_str!("keyword_docs/math.txt").to_string(), | ||
), | ||
( | ||
"log".to_string(), | ||
include_str!("keyword_docs/log.txt").to_string(), | ||
), | ||
( | ||
"asize".to_string(), | ||
include_str!("keyword_docs/asize.txt").to_string(), | ||
), | ||
( | ||
"long".to_string(), | ||
include_str!("keyword_docs/long.txt").to_string(), | ||
), | ||
( | ||
"string".to_string(), | ||
include_str!("keyword_docs/string.txt").to_string(), | ||
), | ||
( | ||
"getarray".to_string(), | ||
include_str!("keyword_docs/getarray.txt").to_string(), | ||
), | ||
( | ||
"putarray".to_string(), | ||
include_str!("keyword_docs/getarray.txt").to_string(), | ||
), | ||
( | ||
"encryption".to_string(), | ||
include_str!("keyword_docs/encryption.txt").to_string(), | ||
), | ||
( | ||
"reverseshort".to_string(), | ||
include_str!("keyword_docs/reverseshort.txt").to_string(), | ||
), | ||
( | ||
"reverselong".to_string(), | ||
include_str!("keyword_docs/reverselong.txt").to_string(), | ||
), | ||
( | ||
"reverselonglong".to_string(), | ||
include_str!("keyword_docs/reverselonglong.txt").to_string(), | ||
), | ||
( | ||
"filexor".to_string(), | ||
include_str!("keyword_docs/filexor.txt").to_string(), | ||
), | ||
( | ||
"append".to_string(), | ||
include_str!("keyword_docs/append.txt").to_string(), | ||
), | ||
( | ||
"getvarchr".to_string(), | ||
include_str!("keyword_docs/getvarchr.txt").to_string(), | ||
), | ||
( | ||
"putvarchr".to_string(), | ||
include_str!("keyword_docs/putvarchr.txt").to_string(), | ||
), | ||
( | ||
"byte".to_string(), | ||
include_str!("keyword_docs/byte.txt").to_string(), | ||
), | ||
( | ||
"comtype".to_string(), | ||
include_str!("keyword_docs/comtype.txt").to_string(), | ||
), | ||
( | ||
"clog".to_string(), | ||
include_str!("keyword_docs/clog.txt").to_string(), | ||
), | ||
( | ||
"padding".to_string(), | ||
include_str!("keyword_docs/padding.txt").to_string(), | ||
), | ||
( | ||
"savepos".to_string(), | ||
include_str!("keyword_docs/savepos.txt").to_string(), | ||
), | ||
( | ||
"extension".to_string(), | ||
include_str!("keyword_docs/extension.txt").to_string(), | ||
), | ||
( | ||
"getdstring".to_string(), | ||
include_str!("keyword_docs/getdstring.txt").to_string(), | ||
), | ||
( | ||
"do".to_string(), | ||
include_str!("keyword_docs/do.txt").to_string(), | ||
), | ||
( | ||
"while".to_string(), | ||
include_str!("keyword_docs/do.txt").to_string(), | ||
), | ||
( | ||
"short".to_string(), | ||
include_str!("keyword_docs/short.txt").to_string(), | ||
), | ||
( | ||
"open".to_string(), | ||
include_str!("keyword_docs/open.txt").to_string(), | ||
), | ||
] | ||
.iter() | ||
.cloned() | ||
.collect() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters