Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>PRD2CodeNew to Visual Studio Code? Get it now.
PRD2Code

PRD2Code

高川

| (0) | Free
PRD to Code - Syntax highlighting and tools for PPML (Page Protocol Markup Language)
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

PRD2Code - PPML Language Support for VS Code

Version VS Code Marketplace License

PRD2Code is a Visual Studio Code extension that provides syntax highlighting and language support for PPML (Page Protocol Markup Language) - a markup language for page protocol descriptions.

Features

🎨 Syntax Highlighting

  • Full syntax highlighting for all PPML elements
  • Color-coded syntax for better readability
  • Support for all PPML syntax elements:
    • Page containers: <页面: [属性]>内容</>
    • UI components: {组件(大小): 内容}
    • Interaction flows: (动作→~条件~→目标|→目标)
    • Conditional expressions: ~表达式~
    • AI-generated content: ?文本?
    • API calls: API:/path
    • Data binding: {变量}
    • Repeat patterns: ...

📝 Language Features

  • Code snippets for common PPML patterns
  • Bracket matching and auto-closing
  • Comment toggling (# for line comments)
  • Word pattern recognition for Chinese and English characters
  • Folding markers for page containers

⚙️ Configuration

  • Customizable syntax highlighting colors
  • Enable/disable syntax highlighting
  • Auto-formatting options

Installation

From VS Code Marketplace

  1. Open VS Code
  2. Go to Extensions view (Ctrl+Shift+X)
  3. Search for "PPML Language Support"
  4. Click Install

Manual Installation

  1. Download the .vsix file from releases
  2. Open VS Code
  3. Go to Extensions view (Ctrl+Shift+X)
  4. Click "..." menu and select "Install from VSIX..."
  5. Select the downloaded file

Usage

Creating PPML Files

  1. Create a new file with .ppml extension
  2. Start writing PPML code
  3. Syntax highlighting will be automatically applied

Example PPML File

# 英语学习系统 - 登录页面
# 版本: 1.0.0

<登录页面: [路由="/login", 认证要求=false]>
  {表单模块(大):
    {标题: "欢迎回来"}
    {描述: "请登录以继续学习"}
    
    {输入组:
      {文本输入(标签="用户名", 占位符="请输入用户名")}
      {密码输入(标签="密码", 占位符="请输入密码")}
    }
    
    {按钮组:
      {主要按钮(文字="登录"):
        (点击→~表单验证通过~→API:/api/auth/login→~成功~→<首页>)
      }
    }
  }
</>

Available Snippets

  • ppml-page - Create a new page container
  • ppml-component - Create a UI component
  • ppml-interaction - Create an interaction flow
  • ppml-condition - Create a conditional expression
  • ppml-api - Create an API call

Configuration

Extension Settings

This extension contributes the following settings:

  • ppml.enableSyntaxHighlighting: Enable/disable syntax highlighting (default: true)
  • ppml.autoFormat: Enable/disable auto-formatting (default: true)

Customizing Colors

You can customize syntax highlighting colors in your VS Code settings:

{
  "editor.tokenColorCustomizations": {
    "textMateRules": [
      {
        "scope": "entity.name.tag.ppml",
        "settings": {
          "foreground": "#569CD6",
          "fontStyle": "bold"
        }
      },
      {
        "scope": "support.class.component.ppml",
        "settings": {
          "foreground": "#4EC9B0"
        }
      }
      // Add more customizations as needed
    ]
  }
}

PPML Syntax Reference

Basic Syntax Elements

Element Syntax Description
Page Container <页面: [属性]>内容</> Defines a page with attributes
UI Component {组件(大小): 内容} Defines a UI component with size
Interaction Flow (动作→~条件~→目标\|→目标) Defines user interaction flows
Condition ~表达式~ Conditional expression
AI Content ?文本? AI-generated content marker
API Call API:/path API endpoint call
Data Binding {变量} Data binding expression
Repeat Pattern ... Repeat pattern indicator

Attributes

  • Page attributes are defined in square brackets: [属性名="值"]
  • Component parameters are defined in parentheses: (大小=中)
  • Supports strings, numbers, and booleans

Development

Building from Source

  1. Clone the repository
  2. Install dependencies:
    cd ppml-extension
    npm install
    
  3. Compile the extension:
    npm run compile
    

Testing

  1. Run tests:
    npm test
    
  2. For development, use watch mode:
    npm run watch
    

Packaging

To create a VSIX package for distribution:

npm run package

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

  • GitHub Issues - Report bugs or request features
  • Documentation - Full documentation

Acknowledgments

  • Thanks to all contributors who have helped with this project
  • Inspired by the need for better protocol description tools
  • Built with ❤️ for the developer community

Enjoy using PPML Language Support! 🚀

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft