Skip to content

tree-sitter grammar for SSH client configuration files

License

Notifications You must be signed in to change notification settings

metio/tree-sitter-ssh-client-config

Folders and files

NameName
Last commit message
Last commit date
Nov 20, 2024
Mar 21, 2023
Nov 13, 2023
Mar 27, 2022
Dec 19, 2024
Nov 13, 2023
Nov 13, 2023
Nov 13, 2023
Mar 21, 2023
Mar 30, 2022
Mar 30, 2022
Mar 30, 2022
Nov 13, 2023
Dec 19, 2024
Nov 14, 2024
Mar 27, 2022
Nov 13, 2023
Oct 18, 2022
Jan 28, 2023
Oct 30, 2022
Mar 21, 2023
Nov 13, 2023
Oct 11, 2024
Oct 11, 2024

Repository files navigation

tree-sitter-ssh-client-config

SSH client config grammar for tree-sitter.

Usage

NodeJS

This grammar is available at npmjs.com, and you can use it together with the NodeJS language binding.

const Parser = require("tree-sitter");
const SSH_CLIENT_CONFIG = require("tree-sitter-ssh-client-config");

const parser = new Parser();
parser.setLanguage(SSH_CLIENT_CONFIG);

const config = `
Host example.com
  User your-name
  Port 12345
`;

const tree = parser.parse(config);
console.log(tree.rootNode.toString());
// (client_config
//   (host
//     (host_value))
//   (user
//     (user_value))
//   (port
//     (port_value)))

References

License

To the extent possible under law, the author(s) have dedicated all copyright
and related and neighboring rights to this software to the public domain
worldwide. This software is distributed without any warranty.

You should have received a copy of the CC0 Public Domain Dedication along with
this software. If not, see https://creativecommons.org/publicdomain/zero/1.0/.