Mercurial > vim
view runtime/syntax/jess.vim @ 33278:b5ed566262d3 v9.0.1906
patch 9.0.1906: Vim9: Interfaces should not support class methods and variables
Commit: https://github.com/vim/vim/commit/92d9ee5f4ca0d2de04c39afbafc7609da43fb2e9
Author: Yegappan Lakshmanan <yegappan@yahoo.com>
Date: Sun Sep 17 17:03:19 2023 +0200
patch 9.0.1906: Vim9: Interfaces should not support class methods and variables
Problem: Vim9: Interfaces should not support class methods and
variables
Solution: Make sure interface follow the interface specification
Vim9 interface changes to follow the new interface specification:
1) An interface can have only read-only and read-write instance
variables.
2) An interface can have only public instance methods.
3) An interface cannot have class variables and class methods.
4) An interface cannot have private instance variables and private
instance methods.
5) A interface can extend another interface using "extends". The
sub-interface gets all the variables and methods in the super
interface.
That means:
- Interfaces should not support class methods and variables.
- Adjust error numbers and add additional tests.
- Interface methods can be defined in one of the super classes.
- Interface variables can be defined in one of the super classes.
and instance variables can be repeated in sub interfaces.
- Check the class variable types with the type in interface.
closes: #13100
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 17 Sep 2023 17:15:06 +0200 |
parents | 46763b01cd9a |
children |
line wrap: on
line source
" Vim syntax file " Language: Jess " Maintainer: Paul Baleme <pbaleme@mail.com> " Last change: September 14, 2000 " Based on lisp.vim by : Dr. Charles E. Campbell, Jr. " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif setlocal iskeyword=42,43,45,47-58,60-62,64-90,97-122,_ " Lists syn match jessSymbol ![^()'`,"; \t]\+! contained syn match jessBarSymbol !|..\{-}|! contained syn region jessList matchgroup=Delimiter start="(" skip="|.\{-}|" matchgroup=Delimiter end=")" contains=jessAtom,jessBQList,jessConcat,jessDeclaration,jessList,jessNumber,jessSymbol,jessSpecial,jessFunc,jessKey,jessAtomMark,jessString,jessComment,jessBarSymbol,jessAtomBarSymbol,jessVar syn region jessBQList matchgroup=PreProc start="`(" skip="|.\{-}|" matchgroup=PreProc end=")" contains=jessAtom,jessBQList,jessConcat,jessDeclaration,jessList,jessNumber,jessSpecial,jessSymbol,jessFunc,jessKey,jessVar,jessAtomMark,jessString,jessComment,jessBarSymbol,jessAtomBarSymbol " Atoms syn match jessAtomMark "'" syn match jessAtom "'("me=e-1 contains=jessAtomMark nextgroup=jessAtomList syn match jessAtom "'[^ \t()]\+" contains=jessAtomMark syn match jessAtomBarSymbol !'|..\{-}|! contains=jessAtomMark syn region jessAtom start=+'"+ skip=+\\"+ end=+"+ syn region jessAtomList matchgroup=Special start="(" skip="|.\{-}|" matchgroup=Special end=")" contained contains=jessAtomList,jessAtomNmbr0,jessString,jessComment,jessAtomBarSymbol syn match jessAtomNmbr "\<[0-9]\+" contained " Standard jess Functions and Macros syn keyword jessFunc * + ** - / < > <= >= <> = syn keyword jessFunc long longp syn keyword jessFunc abs agenda and syn keyword jessFunc assert assert-string bag syn keyword jessFunc batch bind bit-and syn keyword jessFunc bit-not bit-or bload syn keyword jessFunc bsave build call syn keyword jessFunc clear clear-storage close syn keyword jessFunc complement$ context count-query-results syn keyword jessFunc create$ syn keyword jessFunc delete$ div syn keyword jessFunc do-backward-chaining e syn keyword jessFunc engine eq eq* syn keyword jessFunc eval evenp exit syn keyword jessFunc exp explode$ external-addressp syn keyword jessFunc fact-slot-value facts fetch syn keyword jessFunc first$ float floatp syn keyword jessFunc foreach format gensym* syn keyword jessFunc get get-fact-duplication syn keyword jessFunc get-member get-multithreaded-io syn keyword jessFunc get-reset-globals get-salience-evaluation syn keyword jessFunc halt if implode$ syn keyword jessFunc import insert$ integer syn keyword jessFunc integerp intersection$ jess-version-number syn keyword jessFunc jess-version-string length$ syn keyword jessFunc lexemep list-function$ load-facts syn keyword jessFunc load-function load-package log syn keyword jessFunc log10 lowcase matches syn keyword jessFunc max member$ min syn keyword jessFunc mod modify multifieldp syn keyword jessFunc neq new not syn keyword jessFunc nth$ numberp oddp syn keyword jessFunc open or pi syn keyword jessFunc ppdeffunction ppdefglobal ddpefrule syn keyword jessFunc printout random read syn keyword jessFunc readline replace$ reset syn keyword jessFunc rest$ retract retract-string syn keyword jessFunc return round rules syn keyword jessFunc run run-query run-until-halt syn keyword jessFunc save-facts set set-fact-duplication syn keyword jessFunc set-factory set-member set-multithreaded-io syn keyword jessFunc set-node-index-hash set-reset-globals syn keyword jessFunc set-salience-evaluation set-strategy syn keyword jessFunc setgen show-deffacts show-deftemplates syn keyword jessFunc show-jess-listeners socket syn keyword jessFunc sqrt store str-cat syn keyword jessFunc str-compare str-index str-length syn keyword jessFunc stringp sub-string subseq$ syn keyword jessFunc subsetp sym-cat symbolp syn keyword jessFunc system throw time syn keyword jessFunc try undefadvice undefinstance syn keyword jessFunc undefrule union$ unwatch syn keyword jessFunc upcase view watch syn keyword jessFunc while syn match jessFunc "\<c[ad]\+r\>" " jess Keywords (modifiers) syn keyword jessKey defglobal deffunction defrule syn keyword jessKey deffacts syn keyword jessKey defadvice defclass definstance " Standard jess Variables syn region jessVar start="?" end="[^a-zA-Z0-9]"me=e-1 " Strings syn region jessString start=+"+ skip=+\\"+ end=+"+ " Shared with Declarations, Macros, Functions "syn keyword jessDeclaration syn match jessNumber "[0-9]\+" syn match jessSpecial "\*[a-zA-Z_][a-zA-Z_0-9-]*\*" syn match jessSpecial !#|[^()'`,"; \t]\+|#! syn match jessSpecial !#x[0-9a-fA-F]\+! syn match jessSpecial !#o[0-7]\+! syn match jessSpecial !#b[01]\+! syn match jessSpecial !#\\[ -\~]! syn match jessSpecial !#[':][^()'`,"; \t]\+! syn match jessSpecial !#([^()'`,"; \t]\+)! syn match jessConcat "\s\.\s" syntax match jessParenError ")" " Comments syn match jessComment ";.*$" " synchronization syn sync lines=100 " Define the default highlighting. " Only when an item doesn't have highlighting yet hi def link jessAtomNmbr jessNumber hi def link jessAtomMark jessMark hi def link jessAtom Identifier hi def link jessAtomBarSymbol Special hi def link jessBarSymbol Special hi def link jessComment Comment hi def link jessConcat Statement hi def link jessDeclaration Statement hi def link jessFunc Statement hi def link jessKey Type hi def link jessMark Delimiter hi def link jessNumber Number hi def link jessParenError Error hi def link jessSpecial Type hi def link jessString String hi def link jessVar Identifier let b:current_syntax = "jess" " vim: ts=18