Skip to content

refactor using Keyword and Emoji #11

@pietroppeter

Description

@pietroppeter
type
  Keyword = distinct string # e.g "grinning"
  Emoji = distinct string # e.g "😀" 

I think this could be very useful, in particular to add a match functionality that could be used to refactor emojize and will give an easy implementation of #4 (and possibly also #7).

type
  Captures[T] = seq[tuple[index: Natural, pattern: T]]

func match(text: string): Captures[Keyword]
func match(text: string): Captures[Emoji]

Also one could support an Emoji by UniqueKeyword (list of UniqueKeywords generated when parsing emoji data) and Emojis by Keyword.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions