~c7s/public-inbox

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
4 2

[PATCH hare.kak 1/4] Add `raw strings`

Details
Message ID
<20220426220035.19442-1-sebastian@sebsite.pw>
DKIM signature
missing
Download raw message
Patch: +3 -0
Signed-off-by: Sebastian <sebastian@sebsite.pw>
---
 hare.kak | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/hare.kak b/hare.kak
index dc1ed5c..b7863a2 100644
--- a/hare.kak
+++ b/hare.kak
@@ -33,6 +33,9 @@ provide-module hare %{
    add-highlighter shared/hare/string/ regex "(\\u[0-9a-fA-F]{4})" 0:value
    add-highlighter shared/hare/string/ regex "(\\U[0-9a-fA-F]{8})" 0:value

    add-highlighter shared/hare/rawstring region '`' group
    add-highlighter shared/hare/rawstring/ fill string

    add-highlighter shared/hare/rune region "'" (?<!\\)(\\\\)*' group
    add-highlighter shared/hare/rune/ fill string
    add-highlighter shared/hare/rune/ regex "(\\0|\\a|\\b|\\f|\\n|\\r|\\t|\\v|\\\\|\\')" 0:value
-- 
2.35.1

[PATCH hare.kak 2/4] vaargs updates

Details
Message ID
<20220426220035.19442-2-sebastian@sebsite.pw>
In-Reply-To
<20220426220035.19442-1-sebastian@sebsite.pw> (view parent)
DKIM signature
missing
Download raw message
Patch: +2 -1
Signed-off-by: Sebastian <sebastian@sebsite.pw>
---
 hare.kak | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/hare.kak b/hare.kak
index b7863a2..a4387e5 100644
--- a/hare.kak
+++ b/hare.kak
@@ -56,7 +56,7 @@ provide-module hare %{
    add-highlighter shared/hare/code/ regex "\b(fn|type|def)\b" 0:keyword

    # builtins
    add-highlighter shared/hare/code/ regex "\b(len|offset|free|alloc|assert|append|abort|delete|insert)\b" 0:builtin
    add-highlighter shared/hare/code/ regex "\b(len|offset|free|alloc|assert|append|abort|delete|insert|vastart|vaarg|vaend)\b" 0:builtin
    add-highlighter shared/hare/code/ regex "\b(as|is)\b" 0:builtin

    # types
@@ -68,6 +68,7 @@ provide-module hare %{
    add-highlighter shared/hare/code/ regex "\b(f32|f64)\b" 0:type
    add-highlighter shared/hare/code/ regex "\b(str|rune)\b" 0:type
    add-highlighter shared/hare/code/ regex "\b(bool)\b" 0:type
    add-highlighter shared/hare/code/ regex "\b(valist)\b" 0:type

    # literals
    add-highlighter shared/hare/code/ regex "\b(null|true|false)\b" 0:value
-- 
2.35.1

[PATCH hare.kak 3/4] Highlight static as keyword

Details
Message ID
<20220426220035.19442-3-sebastian@sebsite.pw>
In-Reply-To
<20220426220035.19442-1-sebastian@sebsite.pw> (view parent)
DKIM signature
missing
Download raw message
Patch: +2 -2
static isn't used for declarations; it's used as a prefix to assert,
append, and insert.

Signed-off-by: Sebastian <sebastian@sebsite.pw>
---
 hare.kak | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hare.kak b/hare.kak
index a4387e5..26799ed 100644
--- a/hare.kak
+++ b/hare.kak
@@ -52,7 +52,7 @@ provide-module hare %{
    add-highlighter shared/hare/code/ regex "@(offset|init|fini|test|noreturn|symbol)\b" 0:attribute

    # declarations
    add-highlighter shared/hare/code/ regex "\b(let|export|const|static)\b" 0:meta
    add-highlighter shared/hare/code/ regex "\b(let|export|const)\b" 0:meta
    add-highlighter shared/hare/code/ regex "\b(fn|type|def)\b" 0:keyword

    # builtins
@@ -89,7 +89,7 @@ provide-module hare %{


    # control flow
    add-highlighter shared/hare/code/ regex "\b(for|if|else|switch|match|return|break|continue|defer|yield|case)\b" 0:keyword
    add-highlighter shared/hare/code/ regex "\b(for|if|else|switch|match|return|break|continue|defer|yield|case|static)\b" 0:keyword

    # commands
    define-command -hidden hare-indent-on-new-line %{ evaluate-commands -draft -itersel %{
-- 
2.35.1

[PATCH hare.kak 4/4] Highlight null as a type

Details
Message ID
<20220426220035.19442-4-sebastian@sebsite.pw>
In-Reply-To
<20220426220035.19442-1-sebastian@sebsite.pw> (view parent)
DKIM signature
missing
Download raw message
Patch: +3 -3
Signed-off-by: Sebastian <sebastian@sebsite.pw>
---
 hare.kak | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/hare.kak b/hare.kak
index 26799ed..6f99d15 100644
--- a/hare.kak
+++ b/hare.kak
@@ -61,7 +61,7 @@ provide-module hare %{

    # types
    add-highlighter shared/hare/code/ regex "\b(struct|union|enum)\b" 0:type
    add-highlighter shared/hare/code/ regex "\b(nullable|void)\b" 0:type
    add-highlighter shared/hare/code/ regex "\b(nullable|null|void)\b" 0:type
    add-highlighter shared/hare/code/ regex "\b(u8|u16|u32|u64|uint)\b" 0:type
    add-highlighter shared/hare/code/ regex "\b(i8|i16|i32|i64|int)\b" 0:type
    add-highlighter shared/hare/code/ regex "\b(size|uintptr|char)\b" 0:type
@@ -71,7 +71,7 @@ provide-module hare %{
    add-highlighter shared/hare/code/ regex "\b(valist)\b" 0:type

    # literals
    add-highlighter shared/hare/code/ regex "\b(null|true|false)\b" 0:value
    add-highlighter shared/hare/code/ regex "\b(true|false)\b" 0:value
    add-highlighter shared/hare/code/ regex "\b[0-9]+([eE][-+]?[0-9]+)?(z|(i|u)(8|16|32|64)?)?\b" 0:value
    add-highlighter shared/hare/code/ regex "\b[0-9]+([eE][-+]?[0-9]+)?((?=e)|(?=u)|(?=i))" 0:value
    add-highlighter shared/hare/code/ regex "\b0b[0-1]+(z|(i|u)(8|16|32|64)?)?\b" 0:value
@@ -118,6 +118,6 @@ provide-module hare %{
    } }

    # TODO
    # const/void/size/type are ambiguous
    # const/null/void/size are ambiguous
    # indentation (copy c-family.kak)
}
-- 
2.35.1
Details
Message ID
<CJKVOCIJUJCY.6HVQ6UMZ189S@kasku>
In-Reply-To
<20220426220035.19442-1-sebastian@sebsite.pw> (view parent)
DKIM signature
missing
Download raw message
Thanks!

I've already got this change upstream, but I've merged the rest of your
patches.
Reply to thread Export thread (mbox)