1. FBPX
  2. Tokens

Mainly useful to debug your .fbp file.

This action will list the lexer tokens recognized within the file.

It will display each recognized line followed by the recognized tokens.

$ fbpx tokens example.fbp

┌───┬─────────────────────┐
│ 0 │ title: Example flow │
└───┴─────────────────────┘
┌───────────────┬───────────┬──────────────┬───────┬─────┐
│ Scope         │ Token     │ Value        │ Start │ End │
├───────────────┼───────────┼──────────────┼───────┼─────┤
│ LeftHandScope │ META      │ title:       │ 1     │ 6   │
├───────────────┼───────────┼──────────────┼───────┼─────┤
│ MetaScope     │ META_DATA │ Example flow │ 7     │ 19  │
└───────────────┴───────────┴──────────────┴───────┴─────┘

┌───┬──────────────────────────────────────────────────────────┐
│ 1 │ provider https://api.fbpx.io/v1/nodes/rhalff/{ns}/{name} │
└───┴──────────────────────────────────────────────────────────┘
┌───────────────┬──────────────┬─────────────────────────┬───────┬─────┐
│ Scope         │ Token        │ Value                   │ Start │ End │
├───────────────┼──────────────┼─────────────────────────┼───────┼─────┤
│ ProviderScope │ PROVIDER     │ provider                │ 21    │ 29  │
├───────────────┼──────────────┼─────────────────────────┼───────┼─────┤
│ ProviderScope │ PROVIDER_URL │ https://api.fbpx.io/v1… │ 30    │ 77  │
└───────────────┴──────────────┴─────────────────────────┴───────┴─────┘

┌───┬─────────────────────────┐
│ 2 │ Request(superagent/api) │
└───┴─────────────────────────┘
┌───────────────┬─────────┬─────────────────────────┬───────┬─────┐
│ Scope         │ Token   │ Value                   │ Start │ End │
├───────────────┼─────────┼─────────────────────────┼───────┼─────┤
│ LeftHandScope │ PROCESS │ Request(superagent/api… │ 79    │ 102 │
└───────────────┴─────────┴─────────────────────────┴───────┴─────┘

┌───┬────────────────────────────┐
│ 3 │ EndRequest(superagent/end) │
└───┴────────────────────────────┘
┌───────────────┬─────────┬─────────────────────────┬───────┬─────┐
│ Scope         │ Token   │ Value                   │ Start │ End │
├───────────────┼─────────┼─────────────────────────┼───────┼─────┤
│ LeftHandScope │ PROCESS │ EndRequest(superagent/… │ 103   │ 129 │
└───────────────┴─────────┴─────────────────────────┴───────┴─────┘

┌───┬─────────────────────────────────────┐
│ 4 │ 'http://example.com' -> url Request │
└───┴─────────────────────────────────────┘
┌────────────────┬─────────┬─────────────────────┬───────┬─────┐
│ Scope          │ Token   │ Value               │ Start │ End │
├────────────────┼─────────┼─────────────────────┼───────┼─────┤
│ DataScope      │ DATA    │ http://example.com' │ 131   │ 150 │
├────────────────┼─────────┼─────────────────────┼───────┼─────┤
│ RootScope      │ ARROW   │ ->                  │ 152   │ 154 │
├────────────────┼─────────┼─────────────────────┼───────┼─────┤
│ RightHandScope │ IN_PORT │ url                 │ 155   │ 158 │
├────────────────┼─────────┼─────────────────────┼───────┼─────┤
│ RightHandScope │ PROCESS │ Request             │ 159   │ 166 │
└────────────────┴─────────┴─────────────────────┴───────┴─────┘

┌───┬───────────────────────────────────────┐
│ 5 │ Request request -> request EndRequest │
└───┴───────────────────────────────────────┘
┌────────────────┬──────────┬────────────┬───────┬─────┐
│ Scope          │ Token    │ Value      │ Start │ End │
├────────────────┼──────────┼────────────┼───────┼─────┤
│ LeftHandScope  │ PROCESS  │ Request    │ 168   │ 175 │
├────────────────┼──────────┼────────────┼───────┼─────┤
│ LeftHandScope  │ OUT_PORT │ request    │ 176   │ 183 │
├────────────────┼──────────┼────────────┼───────┼─────┤
│ RootScope      │ ARROW    │ ->         │ 184   │ 186 │
├────────────────┼──────────┼────────────┼───────┼─────┤
│ RightHandScope │ IN_PORT  │ request    │ 187   │ 194 │
├────────────────┼──────────┼────────────┼───────┼─────┤
│ RightHandScope │ PROCESS  │ EndRequest │ 195   │ 205 │
└────────────────┴──────────┴────────────┴───────┴─────┘

┌───┬──────────────────────────────────────┐
│ 6 │ Request body -> msg Log(console/log) │
└───┴──────────────────────────────────────┘
┌────────────────┬──────────┬──────────────────┬───────┬─────┐
│ Scope          │ Token    │ Value            │ Start │ End │
├────────────────┼──────────┼──────────────────┼───────┼─────┤
│ LeftHandScope  │ PROCESS  │ Request          │ 206   │ 213 │
├────────────────┼──────────┼──────────────────┼───────┼─────┤
│ LeftHandScope  │ OUT_PORT │ body             │ 214   │ 218 │
├────────────────┼──────────┼──────────────────┼───────┼─────┤
│ RootScope      │ ARROW    │ ->               │ 219   │ 221 │
├────────────────┼──────────┼──────────────────┼───────┼─────┤
│ RightHandScope │ IN_PORT  │ msg              │ 222   │ 225 │
├────────────────┼──────────┼──────────────────┼───────┼─────┤
│ RightHandScope │ PROCESS  │ Log(console/log) │ 226   │ 242 │
└────────────────┴──────────┴──────────────────┴───────┴─────┘