Tokenize a Stack-Based language I've been working on another stack-based golfing language called Stackgoat. In this challenge you'll  be writing a Tokenizer for Stackgoat (or really any general stack-based languages).

Examples

"PPCG"23+
["PPCG", '23', '+']

'a "bc" +
['"a"', '"bc"', '+']

12 34+-"abc\"de'fg\\"
['12', '34', '+', '-', '"abc\"de'fg\\"']

"foo
['"foo"']

(empty input)
[]

' ""
['" "', '""']


Specification

The three types you'll need to handle are:


Strings, anything within ""
Numbers, any sequence of digits
Operators, any other single character besides whitespace


Whitespace is essentially ignored unless it is within a string or separates two numbers.

String / char spec:


Strings are delimited by a ", and when  a \ is encountered, the next character should be escaped.
Chars are prepended by a ' and the character after the ' should be converted into a string literal. 'a -> "a"
' will always have a character after it
Closing quotes should be auto-inserted


Rules:


No form of eval is allowed


Input / Output:


Input can be taken through STDIN, function parameters, or your language's equivalent.
Output should be an array or your language's closest equivalent.
Retina, 68 64 63 bytes

M!s`"(\\.|[^"])*"?|'.|\d+|\S
ms`^'(.)|^"(([^\\"]|\\.)*$)
"$1$2"


or

s`\s*((")(\\.|[^"])*(?&lt;-2&gt;")?|'.|\d+|.)\s*
$1$2¶
\ms`^'(.)
"$1"


I think this covers all the funky edge cases, even those not covered by the test cases in the challenge.

Try it online!