HP Prime PPL Language Support
Publisher: AlexRiverosThemes in package: 1
Resaltado de sintaxis, autocompletado, tema y snippets para el lenguaje PPL de HP Prime.
Resaltado de sintaxis, autocompletado, tema y snippets para el lenguaje PPL de HP Prime.
Full workbench mockup using this variant's colors and tokenColors.
Loading...
Workbench UI color keys from the theme JSON colors map.
TextMate scopes and font styles (syntax highlighting rules).
| scope | foreground | fontStyle |
|---|---|---|
| comment, punctuation.definition.comment | #76be81 | — |
| string | #dca864 | — |
| constant.numeric | #dcdcdc | — |
| constant.language, constant.language.boolean, constant.numeric.symbol | #ffea3f | — |
| constant.character.escape | #ffc049 | — |
| keyword, keyword.control, keyword.control.flow | #ff6671 | — |
| storage, storage.type, storage.modifier, keyword.operator.logical | #af8bff | — |
| keyword.operator, keyword.operator.assignment, keyword.operator.arithmetic, keyword.operator.comparison | #ffc049 | — |
| support.function | #4EC9B0 | — |
| entity.name.function | #e0ae51 | — |
| variable, variable.parameter, meta.parameter | #4EC9B0 | — |
| variable.language, variable.language.this | #dd38a4 | — |
| entity.name.type, entity.name.class, support.class | #c678dd | — |
| entity.name.tag | #ff6671 | — |
| entity.other.attribute-name | #d19a66 | — |
| support.type.property-name.json | #c678dd | — |
| entity.name.section.markdown | #ff6671 | bold |
| — | — | |
| comment.line.double-slash.hpprgm | #fbfbfb74 | — |
| keyword.operator.assignment.hpprgm, keyword.operator.assignment.word.hpprgm, keyword.operator.arithmetic.symbol.hpprgm, keyword.operator.arithmetic.word.hpprgm, keyword.operator.comparison.hpprgm | #ffc049 | — |
| string.quoted.double.hpprgm | #76be81 | — |
| support.function.ppl.hpprgm, support.function.drawing.hpprgm, support.function.arrow.hpprgm, support.function.cas.hpprgm, support.function.catalog.hpprgm | #4EC9B0 | — |
| support.function.app.hpprgm | #66D9EF | — |
| constant.numeric.integer.hex.hpprgm, constant.numeric.integer.octal.hpprgm, constant.numeric.integer.binary.hpprgm, constant.numeric.integer.decimal.hpprgm, constant.numeric.float.hpprgm | #dcdcdc | — |
| keyword.control.hpprgm | #ff6671 | — |
| storage.type.hpprgm, keyword.operator.logical.hpprgm | #af8bff | — |
| variable.language.built-in.hpprgm, variable.language.built-in.real.hpprgm | #dd38a4 | — |
| variable.other.readwrite.hpprgm | #9CDCFE | — |
| support.function.math.hpprgm, constant.language.hpprgm, constant.numeric.symbol.hpprgm | #ffea3f | — |
| entity.name.type.class.hpprgm | #d676df | — |
| support.function.hp-ui-lib.hpprgm | #87b923 | — |
| entity.name.function.qualified.hpprgm, entity.name.function.user.hpprgm | #be9342 | bold |
export interface User {
id: string;
name: string;
role: "admin" | "member";
tags: string[];
}
/**
* Fetch user data by ID
* @param id
* @returns User object or null if ID is invalid
*/
export async function fetchUser(id: string): Promise<User | null> {
if (!id) {
return null;
}
const response = await fetch(`/api/users/${id}`, {
method: "GET",
headers: { Accept: "application/json" },
});
if (!response.ok) {
throw new Error(`HTTP ${response.status}`);
}
return (await response.json()) as User;
}
function greet(user: User): string {
// Simple greeting function that uses the user's name
return `Hello, ${user.name}!`;
}