From 32926a385a4e386a17f61f5e525d942c96fe11e4 Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Tue, 4 Feb 2020 09:15:24 -0500 Subject: [PATCH 1/2] Added section in Monarch docs for Inspect Tokens development helper --- website/monarch.html | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/website/monarch.html b/website/monarch.html index 7880e7e04d..b7b87ff836 100644 --- a/website/monarch.html +++ b/website/monarch.html @@ -383,6 +383,17 @@

Über Advanced: complex embeddings with dynamic end tags< ],

Only when we find a matching end tag (outside a string), $1==$S2, we pop the state and exit the embedded mode. Note that we need @rematch since the editor is ignoring our token classes until we actually exit the embedded mode (and we handle the close tag again in the @root state).

+

 

+

Inspecting Tokens

+ +

Monaco provides an Inspect Tokens tool in browsers to help identify the tokens parsed from source code.

+

To activate:

+
    +
  1. Press F1 while focused on a Monaco instance
  2. +
  3. Trigger the Developer: Inspect Tokens option
  4. +
+ +

This will show a display over the currently selected token for its language, token type, basic font style and colors, and selector you can target in your editor themes.

From cf927a9e2c8e65e2266d7c3dfea8fd8c6e1d352a Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Tue, 4 Feb 2020 09:17:25 -0500 Subject: [PATCH 2/2] Updated h2 id --- website/monarch.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/monarch.html b/website/monarch.html index b7b87ff836..b31c3dc53f 100644 --- a/website/monarch.html +++ b/website/monarch.html @@ -384,7 +384,7 @@

Über Advanced: complex embeddings with dynamic end tags<

Only when we find a matching end tag (outside a string), $1==$S2, we pop the state and exit the embedded mode. Note that we need @rematch since the editor is ignoring our token classes until we actually exit the embedded mode (and we handle the close tag again in the @root state).

 

-

Inspecting Tokens

+

Inspecting Tokens

Monaco provides an Inspect Tokens tool in browsers to help identify the tokens parsed from source code.

To activate: