mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-03 15:14:35 +00:00
Move the Rust tutorial into a sub-directory
To make room for the C++ version next to it :-)
This commit is contained in:
parent
a012809bd0
commit
7b95371c78
26 changed files with 10 additions and 10 deletions
|
@ -1,59 +0,0 @@
|
|||
/* LICENSE BEGIN
|
||||
This file is part of the SixtyFPS Project -- https://sixtyfps.io
|
||||
Copyright (c) 2020 Olivier Goffart <olivier.goffart@sixtyfps.io>
|
||||
Copyright (c) 2020 Simon Hausmann <simon.hausmann@sixtyfps.io>
|
||||
|
||||
SPDX-License-Identifier: GPL-3.0-only
|
||||
This file is also available under commercial licensing terms.
|
||||
Please contact info@sixtyfps.io for more information.
|
||||
LICENSE END */
|
||||
|
||||
hljs.registerLanguage("60", function (hljs) {
|
||||
const KEYWORDS = {
|
||||
keyword:
|
||||
'struct export import signal property animate for in if states transitions parent root self',
|
||||
literal:
|
||||
'true false',
|
||||
built_in:
|
||||
'Rectangle Image Text TouchArea Flickable Clip TextInput Window',
|
||||
type:
|
||||
'bool string int float length logical_length duration resource',
|
||||
};
|
||||
|
||||
return {
|
||||
name: 'sixtyfps',
|
||||
aliases: ['60'],
|
||||
case_insensitive: false,
|
||||
keywords: KEYWORDS,
|
||||
contains: [
|
||||
hljs.QUOTE_STRING_MODE,
|
||||
hljs.C_LINE_COMMENT_MODE,
|
||||
hljs.C_BLOCK_COMMENT_MODE,
|
||||
hljs.COMMENT('/\\*', '\\*/', {
|
||||
contains: ['self']
|
||||
}),
|
||||
{
|
||||
className: 'number',
|
||||
begin: '\\b\\d+(\\.\\d+)?(\\w+)?',
|
||||
relevance: 0
|
||||
},
|
||||
{
|
||||
className: 'title',
|
||||
begin: '\\b[_a-zA-Z][_\\-a-zA-Z0-9]* *:=',
|
||||
},
|
||||
{
|
||||
className: 'symbol',
|
||||
begin: '\\b[_a-zA-Z][_\\-a-zA-Z0-9]*(:| *=>)',
|
||||
},
|
||||
{
|
||||
className: 'built_in',
|
||||
begin: '\\b[_a-zA-Z][_\\-a-zA-Z0-9]*!',
|
||||
},
|
||||
],
|
||||
illegal: /@/
|
||||
};
|
||||
});
|
||||
|
||||
document
|
||||
.querySelectorAll("code.language-60")
|
||||
.forEach((block) => hljs.highlightBlock(block));
|
Loading…
Add table
Add a link
Reference in a new issue