summaryrefslogtreecommitdiff
path: root/uvim/runtime/syntax/lnk.vim
diff options
context:
space:
mode:
authorMehmet Samet Duman <yongdohyun@projecttick.org>2026-04-02 18:44:22 +0300
committerMehmet Samet Duman <yongdohyun@projecttick.org>2026-04-02 18:44:22 +0300
commit934382c8a1ce738589dee9ee0f14e1cec812770e (patch)
treef13715762efd06518f8aec3a2bf39ac8a615987f /uvim/runtime/syntax/lnk.vim
parent0b24459ac12b6cf9fd5a401d647796ca254a8fa8 (diff)
parent7088926316d8d4a7572a242d0765e99adfc8b083 (diff)
downloadProject-Tick-934382c8a1ce738589dee9ee0f14e1cec812770e.tar.gz
Project-Tick-934382c8a1ce738589dee9ee0f14e1cec812770e.zip
Add 'uvim/' from commit '7088926316d8d4a7572a242d0765e99adfc8b083'
git-subtree-dir: uvim git-subtree-mainline: 0b24459ac12b6cf9fd5a401d647796ca254a8fa8 git-subtree-split: 7088926316d8d4a7572a242d0765e99adfc8b083
Diffstat (limited to 'uvim/runtime/syntax/lnk.vim')
-rw-r--r--uvim/runtime/syntax/lnk.vim40
1 files changed, 40 insertions, 0 deletions
diff --git a/uvim/runtime/syntax/lnk.vim b/uvim/runtime/syntax/lnk.vim
new file mode 100644
index 0000000000..45ca382aca
--- /dev/null
+++ b/uvim/runtime/syntax/lnk.vim
@@ -0,0 +1,40 @@
+" Vim syntax file
+" Language: TI linker command file
+" Document: https://downloads.ti.com/docs/esd/SPRUI03A/Content/SPRUI03A_HTML/linker_description.html
+" Document: https://software-dl.ti.com/ccs/esd/documents/sdto_cgt_Linker-Command-File-Primer.html
+" Maintainer: Wu, Zhenyu <wuzhenyu@ustc.edu>
+" Last Change: 2024 Dec 31
+
+if exists("b:current_syntax")
+ finish
+endif
+
+runtime! syntax/cmacro.vim
+
+syn case ignore
+syn match lnkNumber "0x[0-9a-f]\+"
+" Linker command files are ASCII files that contain one or more of the following:
+" Input filenames, which specify object files, archive libraries, or other command files.
+" Linker options, which can be used in the command file in the same manner that they are used on the command line
+syn match lnkOption "^[-+][-_a-zA-Z#@]\+"
+syn match lnkOption "^--[^ \t$=`'"|);]\+"
+syn match lnkFile '[^ =]\+\%(\.\S\+\)\+\>'
+syn match lnkLibFile '[^ =]\+\.lib\>'
+" The MEMORY and SECTIONS linker directives. The MEMORY directive defines the target memory configuration (see Section 8.5.4). The SECTIONS directive controls how sections are built and allocated (see Section 8.5.5.)
+syn keyword lnkKeyword ADDRESS_MASK f LOAD ORIGIN START ALGORITHM FILL LOAD_END PAGE TABLE ALIGN GROUP LOAD_SIZE PALIGN TYPE ATTR HAMMING_MASK LOAD_START PARITY_MASK UNION BLOCK HIGH MEMORY RUN UNORDERED COMPRESSION INPUT_PAGE MIRRORING RUN_END VFILL COPY INPUT_RANGE NOINIT RUN_SIZE DSECT l NOLOAD RUN_START ECC LEN o SECTIONS END LENGTH ORG SIZE
+syn region lnkLibrary start=+<+ end=+>+
+syn match lnkAttrib '\<[RWXI]\+\>'
+syn match lnkSections '\<\.\k\+'
+" Assignment statements, which define and assign values to global symbols
+syn case match
+
+hi def link lnkNumber Number
+hi def link lnkOption Special
+hi def link lnkKeyword Keyword
+hi def link lnkLibrary String
+hi def link lnkFile String
+hi def link lnkLibFile Special
+hi def link lnkAttrib Type
+hi def link lnkSections Macro
+
+let b:current_syntax = "lnk"