npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

mandacaru-js

v1.0.1

Published

Transpilador de Mandacaru (.mdcr) para JavaScript

Readme

🌵 Mandacaru (.mdcr)

Um transpilador de código em Português para JavaScript, focado em ensino de lógica de programação e produtividade.

O Mandacaru é uma linguagem de programação com sintaxe amigável em português que compila diretamente para JavaScript. Ele permite que estudantes e entusiastas foquem na lógica de programação sem as barreiras da língua inglesa.

🚀 Características

  • Sintaxe em Português: Comandos como se, repetir, exibir e receber.
  • Interação Síncrona: Comando receber() para capturar dados do utilizador de forma simples.
  • CLI Integrada: Ferramenta de linha de comando para compilar arquivos .mdcr.
  • Leve e Rápido: Baseado no motor de parsing Nearley e léxico Moo.

📦 Instalação

O Mandacaru pode ser instalado globalmente via NPM:

npm install -g mandacaru-js

🛠️ Como Usar

1. Criar um arquivo Crie um arquivo com a extensão .mdcr (ex: teste.mdcr):

variável nome = "";
exibir("Qual o seu nome?");
receber(nome);

se (nome == "Admin") {
    exibir("Bem-vindo, Administrador!");
} se não {
    exibir("Olá, " + nome + "!");
}

repetir(i, 3) {
    exibir("Contagem: " + (i + 1));
}

2. Compilar No terminal, execute o comando mandacaru apontando para o seu ficheiro:

mandacaru teste.mdcr

Isso gerará automaticamente um arquivo teste.js na mesma pasta. ou:

mandacaru teste.mdcr --output meuteste.js

3. Executar Como o Mandacaru gera código JavaScript padrão, pode executá-lo com o Node.js:

node teste.js

📜 Gramática e Sintaxe

| Mandacaru | JavaScript | Descrição | | ------ | ------ | ------ | | verdadeiro | true | Boleano | | falso | false | Boleano | | E | && | Operador lógico | | OU | || | Operador lógico | | ! | ! | Operador lógico | | ==, !=, >=, <=, >, < | ==, !=, >=, <=, >, < | Operadores de comparação | | + - * / | + - * / | Operadores aritméticos | | = | = | Operador de atribuição | | variável x = 10; | let x = 10; | Declaração de variável mutável | | constante Y = 5; | const Y = 5; | Declaração de constante | | exibir(x); | console.log(x); | Saída de dados | | receber(x); | x = readline... | Entrada de dados (síncrona) | | se (...) { } | if (...) { } | Condicional | | se não se | else if | Condicional alternativa | | se não | else | Caso contrário | | enquanto (...) { } | while (...) { } | Laço de repetição | | repetir(i, 10) { } | for (let i=0; i<10; i++) | Laço de repetição simplificado |

🏗️ Estrutura do Projeto

  • index.js: Ponto de entrada da CLI e pipeline de transpilação.

  • src/gramatica.ne: Definição da gramática da linguagem (Nearley).

  • src/lexer.js: Configuração do analisador léxico (Moo).

  • src/transpilador.js: Motor que converte a AST em código JS.

👤 Autor

Jefferson Henrique Alves da Silva